Technically the original translation was "Thou shalt not commit murder". Taking life is acceptable if in defense, but not when committed in malice.
death penalty is still murder. the person is not posing a current threat to anyone (as an enemy soldier would), so we're just killing people to get rid of them.