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...