Not sure I understand your question.
If it's what I think, I would respond by saying that robots and a.i. have other, non-military, uses, whereas fossil fuels are only and always polluters, they have no other, more benign, applications..
I would not invest in a robotics company, for example, whose clientele are largely military or defense contractors.