Here is where he explains himself. Scroll towards the bottom:
The original quote:
You know, education--if you make the most of it, you study hard, you do your homework, and you make an effort to be smart, uh, you can do well. If you don't, you get stuck in Iraq.Nowadays, it is politically acceptable to attack Bush and his policies, as well as Bush's intelligence, but not so much to attack the rank and file. Kerry tried to make a joke at the president's expense on two counts. #1, that "Bush is dumb" compared to him. #2, that Iraq is a quagmire, and if the oh-so-intelligent and educated Kerry were at the helm, this would not have happened.
Alas for Kerry, he sometimes has a slight problem making himself clear. And so, instead of tapping into the "Bush is dumb" and "Iraq is another Vietnam" memes, he tapped into the negative one about himself -- that he attacks the troops, as he did decades earlier when he testified that troops in Vietnam were guilty of war crimes. His joke backfired as it was misunderstood and fed into a negative stereotype about him.
As far as I'm concerned, the "Bush is dumb" meme is inappropriate in and of itself, but it is in fact acceptable in American society today. So I would believe Kerry here. At the same time, I would believe everyone else that they honestly misunderstood Kerry's unclear joke. This isn't a case of dirty tricks.