Why was the United States unable to achieve victory in the Vietnam war?

We didn't lose we just came back because people of the U.S. were getting tired of the war Technically, we were fighting to maintain South Vietnam as a free country independent of North Vietnam. This was achieved with the signing of the Paris Peace Accord in which North Vietnam agreed to cease military action against the South. When the North resumed their aggression in violation of the accord, the US public would have hanged any politician who dared suggest sending our troops back.