If an American citizen joins a group, including a military, that has declared war on the US and doesn't leave, then he should lose his citizenship.
You emphasise should, whereas I emphasise 'does not.' I agree that Walker should be shot. However, he is entitled to either be treated as a POW in accordance with the Geneva Conventions, or given his day in open court, with a lawyer, and the power to compel witnesses to testify in his defense. This comes with citizenship, which he retains, whether you like it or not.
Afghanistan was not at war with the US when he went there. His intentions are for a jury of his peers (no military tribunal) to decide.
Sorry to trouble you with the Bill of Rights. Statists of all stripes hate it.
The very best thing a jury of his peers (a misnomer since they will be American citizens) could do for his is to insist he leave this country, never to return. If they fail to do this, his life won't be worth a plug nickel. I would be willing to bet he'd be dead within a month.