(Once again I've had to come in cookieless, because the only server that opened was http://126.96.36.199/, and thta doesm't allow cookies)
But what was he supposed to have done that was actually against the law? Being foolish or misguided or even wicked isn't in itself grounds for imprisoning people in a civilised country. Even less relevant is whether people think they are admirable people, or lose any sleep over what happpens to them.
Retaining American citzienship while belonging to a foreign army? Like Americans in the Spanish Civil War? Or in the Israel Armed Forces? There must be young Americans serving in foreign armies of one sort or another all over the world.
The Taliban were very nasty, but so are lots of regimes that governments in the West have cosied up to and contiue to cosy up to, and it's hardly unusual for some of these to go in for what can reasonably be described as terrorism.
The US government might have said things about the Taliban, but in practical term there wasn't anything like the hostility in, expressed in sanctions and so forth, that they have against Cuba or Iran or Iran.
The point is, at the time he went out and joined up there was no fighting whatsoever between Americans and the Taliban. And there had never been - if anything the reverse, going back to the war against the Rusian occupation of Afghanistan, when the people who led the Taliban receved all kinds of backing from America. And even when it came to the liberation of Afghanistan by American backed forces (including people who had fought with the Russians a few years earlier), American ground troops were not involved in any numbers. It was a civil war, and he was on the losing side.
He entered a guilty plea, and so avoided a death sentence. What does that prove? Because of the way the courts work in the USA and America this had the resault of ensuring that there was no trial, and the evidence was never brought into the open.