Here is how I imagine a scenario of a huge war between two powerful countries or two united opposing forces in the near future. In my scenario, a near future will be almost unthinkable if essential something isn't automated and fully capable of self-regulating through Artificial Intelligence. If two opposing forces are all automated and regulated by AI capabilities -- how much collateral damage would there be on human civilians? Is it just too dumb to allow a human soldier to be fighting against a more capable AI mechanized counterpart?
I imagine that two opposing forces would launch an all-out war with all the weapons they have in their arsenals. Such weapons could be fully mechanized automated machines to fully automated electronic spy drones and such. I also imagine that these two opposing forces would prefer not to use human soldiers for most parts of the war. Human soldiers would probably be on standby to evacuate the human civilians if there won't enough mechanized units that are still available in doing such a job.
As the war intensifies, each force would pray that their technology and AI-automated weapons could outdo the other until either the enemy's units and weapons run low or their own units got annihilated. Once such an intense process runs through its course, the victor would aim their robotic units at the enemy's human civilian and non-civilian forces. The losing side got almost no option at this point! Either be a hero to fight to the death or surrender unconditionally.
Of course, I leave out the possibility that a nuclear war could be provoked. How come? I imagine that if such a war between two opposing forces could break out -- it means nuclear weapons would probably be canceled out of the equation or rendered less capable somehow. Perhaps, if such a war occurs between such two forces, it means either both sides have already somehow disabled each other nuclear weapons or one of these two forces is suicidal.
In conclusion, human soldiers may not be very useful in the future unless they're going to be used as human spies to infiltrate the enemy's human networks. For most parts of a futuristic war, fully automated AI mechanized units would be used to subdue the enemy or enemies. A futuristic war could break out between the two most powerful forces means nuclear weapons are no longer in the strategic calculation because these weapons either got disabled somehow or someone is on a suicidal mission.