I'm not sure what Jesus was teaching at the time he addressed them was "the death penalty is wrong".
When Jesus said to the woman "neither do I condemn you"... I think he was speaking to her on a spiritual plain. A "kingdom of heaven" plain. I don't think any part of that lesson was pertaining to the death penalty for murderers.
Ill never say there should be no civil penalty for crimes. Frankly, I fear a life in prison more than I would fear the death penalty.
But as I said, the messages given in the Bible are mixed with regard to the death penalty.
I think he was commenting on a mob killing.