Sorry, but you ought to watch the episode again.
At no point, no matter who Kirk is talking to, is there any suggestion that the order in question is a "code" or not real.
And in fact, when challenged by Anan 7 to the effect that General Order 24 exemplifies human savagery, Kirk acknowledges that as truth and uses it to further his point about rising above our natures.
How much of a hypocrite and fraud do you assume Kirk to be?
All you're doing is making up excuses to ignore a significant story point that stands uncontradicted within the onscreen narrative, because the inconsistency with other more "ideal" portrayals of the Federation apparently makes you uncomfortable. Go right ahead and do that, if you like.
But you're not making a valid argument for the claim by finding anything within the narrative itself to support it.