That's a fallacy.
WWII did end the unemployment of the Depression, but when the government forces 9 million citizens into the military that will happen. For those Americans left at home, living standards were lower than during the Depression because consumer goods were so severely rationed.
The Depression was ended finally because, after the death of FDR, a Republican congress ended most of the Depression-era controls that had hobbled the economy. War does not create economic growth.
It just eats up capital manufacturing goods destined for destruction on the battlefield. This is not an anti-war screed, just an economic truth.
My father wasn’t drafted, he voluntarily joined the Marine Corps. Do you know the percentage of men who were considered unfit to serve physically due to malnutrition?
Indirectly it can, by forcing cuts in welfare spending and increasing investment in new technologies. Our modern life is a reflection of all the new technologies invented during WWII: jets, rockets, microwaves, radar, nuclear energy, computers. The list is long. The best war of all though is a cold war.
We have all the base technologies right now for a robotics boom but we aren't moving very fast on that. The biggest customer of "cutting edge" robotics is as expected: the U.S. military.