Death sentence is wrong for any crime. And treason isn't even the most serious of all in many cases.
Treason is so open to interpretation anyway. You could assassinate Trump
because you love your country and have good intentions because you believe he will ultimately bring about the apocalypse. If you killed the President honestly believing this, is it still treason? If your motive for killing was to hurt America and aid its enemies then sure, your motive is treasonous.
Execution is a deterrent.
It might be, but when you have people given the death sentence still alive more than 20 years after they committed the crime then the deterrent is mostly lost. Especially in a country where some of these people on death row, having food and shelter for so long, probably think they have no prospects on the 'outside'
It's like if you get caught for speeding. You are more likely to learn the lesson getting a fine on the spot by a police officer than you are getting a letter in the mail 2 weeks later. If execution was to have much more of a deterrent effect, you would need to do it soon after the fact. Not 20 years later.