Assuming that you have not been bringing wood pallets from China to your home there isn't anything you could have done.
This website from Illinois University is informative. The ash borer is spreading slowly throughout North America and the only solution we have is to cut down ash trees. Thousands have been cut where I live and many more will be as the pest spreads out.
There are no proven solutions using biological predators in use now and no resistant varieties yet.
From various articles it seems likely that predators and new cultivars based on Chinese or Korean Ash should be available within ten years.