I don't think the main focus is on converting military operations themselves to work without fossil fuels, but more that if you can convert your civilian industry then you have a much better overall strategic position because your total demand for fossil fuels is much lower. (Strategy is a lot more than just your military)
Solar panels have 25 year warranty. Can you think of anything that you have bought or can buy with a 25 year warranty?
At the end of 25 years, they will produce 92%. Perfectly acceptable for a few more decades. The latest panels produce 740 - 800W+/panel, this is sufficient for a lifetime without ever having to think of upgrades.
That won't help you if you can't refine it. Russia has more oil than most and has/had lots of refineries. Ukraine has taken out so many of them that Trump is complaining it's affecting the price of diesel (even though the US also has lots of oil and lots of refineries).
Oil infrastructure is temporary, expensive and fragile whereas panels work for 30 years.
The problem is net usage. The UK has oil fields and it owns refineries, but it uses a lot more fuel than could be extracted and processed with these operations even if somehow Capitalism was dead and the State seized control of everything for domestic use rather than corporate profit.
The energy balance data I've looked at doesn't go back more than this century so maybe in the 1980s or something it would have been theoretically possible, but it isn't today and hasn't been for decades.
You still need raw materials to build oil tanks and pipelines and fuel trucks. They don't grow on trees.
Funny thing is, fuel can be transported, so that's not needed!
If you want to look at the geopolitics of it, all of the bigger countries do in fact have their own sources of oil and their own refineries.
And if you're going the solar route, you still need the raw materials to build the solar panels (and batteries, and EVs) in the first place. They don't grow on trees.
I'm sure we'll see a transition to electric some day, it is more efficient purely from a physics standpoint. But I'd be shocked to see the military transition before civilian industry.