In the Penal Colony
Character Role Analysis
The Old Commandant
It's unclear who the real antagonist of the story is. The officer is certainly the person with the opposing perspective to the explorer's, but at most he tries to win the explorer over to his side. He doesn't actively oppose him in any way. The most likely candidate for the bad-guy role is the old Commandant, since he's responsible for creating the system that horrifies the explorer. Depending on how you read the story, he may also come across as a sick human being guilty of playing God and responsible for brainwashing the officer into believing that he is God. Then again, he could be God (check out his "Character Analysis.")
The New Commandant
Although the explorer's the guy who disapproves of the machine, the only reason the officer needs to appeal to the explorer is because the new Commandant has been attacking his beloved justice procedure for a while now. It's the new Commandant who's really responsible for the decay of the officer's "procedure," and so indirectly for the officer's suicide. That makes him the antagonist. Then again, even if you were sympathetic to the officer but saw him as mad or brainwashed, the antagonist could be the old Commandant. Or his own madness.