In military terms, the US
did hold South Vietnam against insurgency. The problem is that the source of support for that insurgency was in North Vietnam, and it was impossible for US ground troops to advance there and eliminate that support.
The war effort was also politically micromanaged--for instance, every airstrike had to be individually approved by the White House. This led to delays and, frankly, interference in military affairs from incompetent politicians.
Fighting a counterinsurgent war on the defensive is never strategically sound; one is always better served by being on the move and taking the initiative. This was politically impossible in Vietnam, which is why it took so long.
Now, perhaps there were valid political reasons not to invade north Vietnam. In that case, the answer is not to get involved at all. You either do the job right or you don't do it at all. In either case, the mistake wasn't that the US invaded Vietnam without a good reason--there was no invasion, and there was a good reason. The mistake was that the US didn't fully commit to the objective, and that the White House didn't let the military do their job.