In Viet Nam, the US(+ allies) and South Vietnamese Army (ARVN) were fighting both a guerrilla force (the Vietcong, or VC) and a regular conventional army, the North Vietnamese Army (NVA). Extremely important to note is that the NVA and the VC were aided by neighboring Communist China.
Despite a poor strategy from the LBJ Administration, the US did not suffer a military defeat. Why was the strategy poor? For one thing, we refused to close of the Ho Chi Minh Trail that brought supplies and routes of attack for the Communists. We did not attack that because it was not in Vietnamese territory. LBJ actually made too much use of air force--air force that was ineffective. Air force was also worse at discriminating targets, so civilians were sometimes killed accidentally, which lessens civilian support of US. Tanks weren't really an issue. The NVA never beat the US in any major battle. And even the VC was really destroyed during the Tet Offensive of 1968 because they adopted conventional tactics too soon. It's much more complicated than this, but you probably get the idea.
The fact is that in counterinsurgency, ground units are the most important and effective. The more ground units the better for several reasons--they are better at preventing civilian casualties, they make the US look committed to victory, they decrease insurgent moral, they make US troops feel more confident and secure, they can make more areas secure and raise more Afghan security personnel. You can't do that stuff with airpower and tanks alone--you need people on the ground with the civilians. You win over the population, and keep the American public convinced we are winning, and there should be a victory for the US.