The forfeiture of anything (including one's life) as a sanction is prima facie punishment. Vengeance is retaliation.
You could argue punishment and retaliation are cousins but they're not one and the same.
I guess the best example I can demonstrate is children who are loved experience punishment for the actions. Children that are abused experience vengeance for their actions.
But doesn't that just go back to the old "eye for an eye" mindset of the biblical age. If as you say the taking of a life must in fact be substituted with the taking of another (a simplistic example but you get my meaning), doesn't that just make those who carry it out as guilty as the criminal they're putting to death? A life is a life after all no matter how despicable it may have been or how much we the public hated them, he/she still is a conscious living being and to take that away brings us as a society down to their level. Is this not the same thing? I'm sure you'll argue that the two are separate events but how could they be, a life is taken in both accounts. It's just that in one instance it is under the banner of punishment whereas the other was done under the circumstances known only to the individual. I find this excuse to be a copout. I’ll reiterate my previous point; capital punishment by its very nature is nothing more than an act of revenge.
The state should have no right to kill people unless it feels the need to live by its own rules.
Prisons are there for a reason. They are there so that those who do not live by societal rules can be removed for an extended period depending on the severity of their crime which is regulated by the government. A life sentence for the taking of a life seems like far more of a punishment for such a crime in a civilised society than the state killing them ever would.
[Written quickly so if there are any errors or if I ramble, I apologise]