'I can assure you that from the President on down everybody is determined to support you and the country team in winning the war against the Viet Cong' Averell Harriman wrote to Ambassador Lodge on 14 September 1963, following his meetings with Kennedy. On 17 September Kennedy told his NSC advisers that the goal remains the winning of the war.
The legend that Kennedy was aiming to withdraw was put about by Arthur Schlesinger, some years afterwards, when the Viet Cong victory was settled. At the time the same Schlesinger, who was writing a reportage history of the Kennedy administration made no mention of this intent on Kennedy's part.
Part of the confusion arises from a McNamara proposal for a troop reduction, but as Noam Chomsky explains, Kennedy's intervention on this is to insist that there will be no troop reduction until after the Viet Cong has been defeated (Rethinking Camelot).
It seems more likely, given his explicit support for the Vietnam war, that Kennedy was killed because of his anti-communism, than because he was soft on communism - for the obvious reason that he was not soft on communism, he was a committed anti-communist.
The legend of Kennedy's liberal attitude towards communism is entirely a retrospective projection of people's wishes that it were so, and their emotional investment in this American icon. It has nothing to do with Kennedy's actual record, which was, like his father's, on the aggressively anti-communist end of that particular spectrum.