Bonus question: Does it matter that Walker joined the Taliban before war broke out between it and the United States?
Not necessarily, because he did continue fighting for it when the United States engaged them in war. But he might avoid both loss of citizenship and a treason conviction by showing that he acted under duress.
Once the United States and the Taliban became enemies, he would argue, he had no choice: He'd be shot as a deserter or a spy if he tried to quit then. According to D'Aquino v. United States (1951)—the "Tokyo Rose" case—such a defense would work, but only if Walker could show that he "manifest[ed] a determination to resist commands and orders until such time as he is faced with the alternative of immediate injury or death. ... The person claiming the defense of coercion and duress must be a person whose resistance has brought him to the last ditch."
Not an easy burden to satisfy, but at least possible—if Walker did indeed want to quit (a big if) but couldn't. The showing that Walker would have to make to avoid loss of citizenship is probably less demanding.