All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
The verse that you referred to in the question is the Saying of Allah (which means): {Because of that, We decreed upon the Children of Israel that whoever kills a soul unless for a soul or for corruption [done] in the land - it is as if he had slain mankind entirely. And whoever saves one - it is as if he had saved mankind entirely. And our messengers had certainly come to them with clear proofs. Then indeed many of them, [even] after that, throughout the land, were transgressors.} [Quran 5:32]
First of all, we must know the resemblance mentioned in the verse, between killing one soul and killing all the people (entire mankind) in order to know whether this also applies to this nation or that it is specific to the Children of Israel.
One of the best scholars who has clarified the resemblance mentioned in the verse is Imam Ibn Al-Qayyim in his book Al-Jawaab Al-Kaafi. The following is a summary of his statement on the similarity between the killing of one single soul and the killing of all the people:
1 - The one who kills one single soul is disobedient to Allah and to His Prophet . In this respect, he is like the one who kills all the people. Both killers are disobedient, despite the difference in the degree of disobedience.
2- They are both alike in deserving the legal retribution of being killed.
3- They are both equally daring to shed blood that is forbidden to kill. The one who kills a single soul unjustly will dare to kill anyone he can and is able to kill; he is hostile to the entire human species.
4- The one who kills one single soul is called a murderer, a dissolute person [Faasiq], an oppressor, or a sinner for killing this one single soul. The one who kills all the people is called the same thing.
Based on this, the verse also applies to this nation and it is not specific to the Children of Israel. If a Muslim kills one single soul without the latter having killed a soul or done corruption in the land, then he is like the one who kills all the people in respect to being disobedient to Allah and deserving to be killed by legal retribution. He is like the one who kills all the people by daring to shed forbidden blood.
This verse does not indicate that killing is absolutely prohibited; rather, it indicates that it is forbidden to kill a soul without this soul having killed another soul, or having done corruption in the land, as it is evident from the Saying of Allah (which means): {unless for a soul or for corruption [done] in the land}. Nonetheless, if someone has killed a soul or has done corruption in the land, then he deserves to be killed if the Islamic conditions are fulfilled. We hope that now the answer to your question about killing someone who deserves to be killed is clear.
Allah knows best.