Actually the ground war went well we destroyed the insurgents in the 67 tet offensive after that every supposed insurgent was actually a North Vietnamese Regular shipped in. We did not lose until the politicians gave up.
The politicians looked to be out of their depth. Puzzled because it wasnt a quick win. Afghanistan ?
The only thing that we got wrong in Afghanistan was getting distracted by Iraq drawing valuable resources away from Afghanistan which allowed the Taliban and al-Qaida to regroup into somewhat effective guerrilla organizations. If we had kept up the pressure that would have been a different story, they would have been completely neutralized being trapped in the mountains under constant attack and unable to respond in any real significant manner and eventually starved out.
Al-Qaida and Bin-Laden wanted the US (and our western allies) to invade somewhere in the ME, Iran or Iraq because they believed the whole of the Muslim ME would rise up against us with all the holy places in those two countries. What they didn't want or expect was our going after them in Afghanistan, a relatively insignificant country as far as even Muslims are concerned, that took them by surprise.