We emerged as the wealthiest nation because the rest of the civilised world had been reduced to rubble. It's really easy to have the best, most productive economy in the world when one's manufacturing base is untouched and one has suffered a relatively small injury to one's workforce.
Germans were starving to death in 1946; Brits were still rationing meat and food in 1954, and cheese for decades to come.
Wars are not in general good for the economy: they result in the destruction of capital and of labour.
I was merely replying to the parent comment, globally WWII was a disaster, economically the US profited massively, not just relative to the rest of the world and it could probably have carried on fighting the longest. For instance the war effort lead to the industrialization of a much larger part of the country than before and immigration of skilled labor towards the west coast.
As you said it did not suffer any damage to its industry and took over from Britain, France and Japan as the imperial power in the Middle East and Asia.
There have been plenty of conventional land wars in the following years with US involvement, the difference was that while WWII was fought to establish large American spheres of influence, the following wars were fought been to maintain the American empire.
It is pretty hard to quantify, but I'm confident that people in power thought that the net benefit of maintaining hegemony in South East Asia (Korean/Vietnam war) and the Middle East (financing Israel, the Iraq wars), outweighed the cost.