In a perfect world, killing a terrorist would indeed end their threat. In our imperfect world, killing a terrorist only ensures they will never murder anyone else. It says nothing of the dozen or so admirers for each slain who spring up like dragon's teeth.
So? You keep killing the terrorists until there are no more. That goes for their admirers too.