You're not understanding that the U.S. military is more or less under civilian control. Saying that the military "failed" in Vietnam is technically accurate, but only if you ignore the fact that they were ordered to step into a horrible mess without a declared war to help galvanize support on the home front. Those orders came from civilians.
Granted, the civilian government wasn't exactly sensible at the time. But unless Vietnamese civilian killings and crop destruction were specifically
ordered in each case by US political leadership, then I can and will hold them to blame for their actions (in fact, even if that behavior
was explicitly ordered, I
think (but I'm not positive) that those orders might be considered unlawful, and military personnel could be prosecuted for following them
there, as well). As it was, the military's prerogative should have been to carry out their orders in such a way that the absolute minimum civilian and collateral damage was inflicted. They didn't. Could a well-behaved military have pulled something approaching a positive outcome out of Vietnam? Probably not. But a badly-behaved military certainly did not help.
(Note that when I say "the military", I mean the organization and its actual willing backers. A lot of the soldiers (especially in VN) were just caught up in the mess for economic reasons or because, you know, there was a draft. I have nothing against them.)