As far as the death penalty is concerned, we are all under the death penalty, as a result of sin:
GE 2:17 “You must not eat from the tree of the knowledge of good and evil, for when you eat of it you will surely die.”
Rom. 5:12 “Therefore, just as sin entered the world through one man, and death through sin, and in this way death came to all men, because all sinned…”
And Samuel carried out the death penalty with Agag (1 Sam. 15:33), and the Israelites with the Amalekites (1 Sam. 15:2-3) and with Jericho (Joshua 6:21), and with Achan.
In the New Testament we read of examples like Ananias and Sapphira (Acts 5), and 1 Cor. 11:30: “That is why many among you are weak and sick, and a number of you have fallen asleep.”
Psalms 102:24 So I said: “Do not take me away, O my God, in the midst of my days; your years go on through all generations.”
So I believe the death penalty is Biblical, that the command “Thou shalt not kill” refers to murder, not to the death penalty: “But if a man schemes and kills another man deliberately, take him away from my altar and put him to death” (Ex. 21:14).
But again, we can’t point our finger at those who deserve to die, for Scripture teaches, we all do.