As with most Americans, at the start, Kerry supported the war in Vietnam. Unlike almost all Americans of privilege (see, e.g., George Bush and Dick Cheney), Kerry demonstrated his support by volunteering to serve in that war. But after his experience, he—as almost all Americans—came to believe that war was a mistake. Our government had lied to get us into the war; it had lied about its prosecution of the war. Based upon the facts, he changed his mind.
The same is true about the war on Iraq. As with most Americans, Kerry supported giving the President the authority to go to war. As with most Americans, Kerry expected the President would exercise that authority in a way that did not unnecessarily put America at risk. But after his experience, he—as with most Americans—came to believe that war was a mistake. Most of us believe our government lied to get us into the war; most believe it has lied about its prosecution of the war. Based upon the facts, Kerry is now critical of a war he supported at the start.
This is not flip-flopping. It is evidence of a functioning brain. When you learn that the premise of your action was false, you should rethink your action. When you learn that the premise of a war was false, you should rethink the justification for the war. Being stubborn in the face of reality doesn't make you principled. It makes you Chairman Mao.
Another good indicator of a functioning brain is that you recognize the fallacy of the "Kerry flipflopped on Iraq" argument. But then, we knew that the far right had sacrificed its brainpower to the altar of dittoheadedness long ago.