First of all, the US did not lose the war in Viet Nam. We simply chose to withdraw. There is a difference. The US won nearly every engagement, but the North's strategy was to wage a war of attrition. No matter how many casualties, the North would continue to send more troops.
After realizing , their strategy, the US facing growing discontent for the deaths of their sons in battle, decided to pull out. It's not as simple as that, but the fact is for every soldier or Marine KIA there was 10-15 NVA killed. We were not willing to sacrifice more American lives until every NVA was dead.
Granted the massive air strikes of the North were successful, but they were limited in their scope. If we had conducted more massive bombings over the entire country, it may have made a difference, but to what expense. There is a difference between war and genocide.
The point is, we did not lose the war, we chose to leave and we should have never been there in the first place. Same is true for Iraq and Afganistan.
My viewpoint is one from someone who made a living off war for nearly 50 years. The US Military is the greatest, most poweful war machine in the history of time, so pardon my sensitivity to your blanket statement. We, the military did not lose the war. We, the government did, from the beginning.