Yep, that is true. Unfortunately our criminal justice system, like all such systems is imperfect and mistakes have been and will continue to be made. Hopefully less all the time, and I think the Innocence Project has helped a lot. We have learned a lot about DNA and its value, and the unreliability of many eye witness accounts.
On the other hand is a mistaken conviction leading to many many years in prison any worse than the death penalty? I'm not sure.
As
@hollydolly suggests perhaps we could limit death penalties to cases where there is near absolute certainty.