"Not a single Confederate was ever prosecuted for treason"
It's interesting that to be prosecuted for treason, you must be a citizen of the US. Citizens of the CSA were not US citizens so they couldn't be prosecuted for making defensive war on the US.
It is arguable and a constitutional issue, but they were all US citizens. That was the Northern position. It's my understanding that at Appomatax Courthouse, the issue of treason had already been dismissed by President Lincoln and Grant was gracious to the losers.