There are two ways to alter someone's behavior - persuasion and force.
The ideal is persuasion, but it doesn't always work. For example, someone who wants to rape your daughter may not be talked out of it, but threatening him with a gun (force) may prevent the assault. You may not be able to talk someone out of murdering you, but meeting their force with force could save your life - and executing the murderer as punishment may persuade others not to use violence out of fear of their own lives.
Evil is finding pleasure in inflicting pain on others. Force, in and of itself, is not always bad. Using force to stop an army that would kill your family and rape your daughters is not bad, not immoral. Using force to burn down others' homes and harm their families IS bad.
But sometimes force is the only option to stop bad people who will use force to get their way. Terrorists, for example, use force to scare people into submission because they will now do anything the terrorists ask out of fear of future violence. You can try to persuade terrorists out of their violent ideology that justifies the violence, but sometimes the only solution to protect the innocent is to kill the terrorist so they don't kill more people ... and the remaining terrorists may give up the terrorism out of fear of their lives or seek to persuade/convert others instead of using violence.