Many of the characters in For Whom the Bell Tolls find their moral beliefs troubled by the war in which they're fighting. Winning a war requires the use of violence to defeat or eliminate one's enemies; that much everyone agrees. But even if violence is necessary, it's not clear that makes it right. Some characters think it certainly doesn't, and try to find ways of reassuring themselves even as they feel compelled to kill; the protagonist is, with a few complications, one such character. But if killing can't ever be right, how is one to understand what one is doing?
For Robert Jordan, to say that "killing is never right" simply means that one should never feel pleasure in doing it. It does not mean that killing is never justified – it obviously is in the case of war.