When has Avesta been written and when were people using Avestan language?
Avesta has not been written on a time. It has been written during ages or even centuries by different persons. It seems the newest part of Avesta has been written under Arcasides. and the oldest part, called Gatha(s), has been recited by Zarathushtra himself. So, the language of the Gatha(s) is much different with the rest. (like Old English and modern English). The linguists call these two parts “Old Avesta” and “Young Avesta”. Avestan was a dead language even under Sassanids. The Zoroastrian priests under Sassanids prepared a Middle Persian or Pahlavi translation of the Avesta but with as much errors as possible.