"Could a U.S. soldier have been tried and convicted of treason against Germany in World War 2?"
By using this comparison in the context of US or Union versus Confederate jurisdiction, you're validating the CSA as a nation. For some reason, it strikes me as odd that you would choose to do this. John Brown very likely would have been convicted of treason by the United States, or Union, government. So, your beef with presiding Judge Parker is... what? That he didn't follow common law precedent?
That could be because you haven't looked into the Brown execution. Brown was convicted of treason against the Commonwealth of Virginia, which was a crime outlined in the state constitution. The confederate states doesn't enter into it. And I still don't understand how someone who had neved lived in Virginia and who wasn't a citizen of Virginia could be convicted of treason against the commonwealth.