i think that the bottom line is they have the political will to want to win in afghanistan. that makes all the difference.
in vietnam, the entire course of their involvement was characterisd by "mission creep"... they just kept increasing their commitments without knowing exactly what they were trying to achieve.
it was sick... the entire involvement spanned 4 presidencies and ruined 2 of them

eisenhower, kennedy, johnson, nixon. and kennedy was only spared cos he got wasted before the shit hit the fan

there was never any effort to coordinate military advances with political and diplomatic advances and soldiers were often left high and dry because of this.
most importantly, they gave the initiative to end the war to the enemy. they just kept trying to make it too damn painful for the enemy to stop without realising that the NVA and VC had a far higher treshold of pain and needed a far lower level of supplies to keep fighting. the ho chin minh trail was able to supply the vietnamese to keep them fighting and the US did not have the political will to stop it.
u compare the air war over afghanistan to the air war over vietnam, u would find that "rolling thunder" was a horrible failure and they learnt from it and used the experience to fight in iraq and more recently, afghanistan.
so bottom line, they went into vietnam to try to get the other guy to stop fighting but they went to afghanistan with every intention to kick the shit out of osama, al Q and taliban so they can't fight anymore!
BIG difference... both in intentions and in its eventual results.