A country is occupying another country, supposedly because of some imagined threat.
Unsurprisingly inhabitants of occupied country have no inclination to accept foreign occupation and fight against it by any means they can.
As part of it's "strategy" the occupying force shores up a corrupt government which is brought to power in rigged elections. Said government's own abuses of human rights are just as bad as those which they claim to be against.
The occupying force is hopelessly bogged down, less and less wanted by the local population, and ends being stuck there for years.
The parallels are quite strong aren't they?
There's one more parallel - after years (and nearly 60,000 deaths of their own and untold millions of Vietnamese and Cambodians), the Americans negotiated a settlement and a withdrawal with people they previously called "terrorists".
Do we have wait that long and shed that much blood before we start that process in Afghanistan?