Its not just the geography and topography that is different. The politics surrounding the conflict are also different. Here in the United States there are similarities. However, in Afghanistan and Pakistan they are far different.
The most obvious difference is that there is no China/Russia supplying insurgency. However, that is only a minor difference in understanding why you should not look to either war to understand what is happening in Afghanistan. The biggest difference is that Viet Nam was one of, if not the, last of the Colonial war. Afghanistan is one of the, and possibly, last of the Cold War wars.
Just as the Colonial war that was Viet Nam morphed into a proxy for the Cold War. So to has the Cold War war that was Afghanistan morphed into a proxy for whatever the conglomeration of political struggles currently most often referred to as the 'War on Terrorism'. I put it that way because I don't think that is what its final title will be.
Afghanistan has historically been referred to as "The Graveyard of Empires." Where that has great poetic form. It isn't the actual truth. No "Empire" collapsed directly because they attacked Afghanistan.
Alexander the Great's Greek empire collapsed because Alexander the Great died and it was an empire that was built upon his personality not because his last expansion drive started to attack the region just prior to his death. Persia invaded region repeatedly and collapsed only when invaded by greater empires, like Alexander's or Britain's. England's and other European colonial empires were already winding down and splintering off with little to do with forays into Afghanistan and far more to do with reprecussions of WW I and WW II. The Soviet Union's economy was well on the road to collapse prior to its invasion of Afghanistan and just as Nationalism due to being at war masked some inherent civil unhappiness of the United States post 9/11, invading Afghanistan could well be argued to have allowed the USSR to have added 3-5 years to its life span.
Also, Viet Nam and Iraq Wars have another major difference with Afghanistan. Organisations protected by the ruling government of Afghanistan attacked the United States with naked aggression. All countries have the right to defend themselves and counter-attack nations that aid and succor organisations that use deadly force upon a large segment of its population. I don't recall Al Queda or the Taliban surrendering or even attempting to negotiate a cease fire with the United States. Until such actions occur, the United States is still at war with them. Even if they are in exile and has every right to prevent them from re-entering the country they were expuled from.