Can I claim the energy tax credit for improvements in previous years?

I installed doors and insulation in 2017, Windows in 2018, and doors and solar panels in 2019. When I filed my returns in 2017 and 2018, I didn't see the option to file for credit for these improvements. I guess there was some issue with them extending the credits retroactively or something? Can I list all of these improvements in my 2019 return? Or do I need to go back and file an amended tax return for 2017 and 2018? If so, how do I do that and what does it cost?