As a kid, Ender's older brother is a bully and loves torturing animals just because, which is why the military program rejects him. Great leaders aren't sadists. They need empathy so their troops will want to support them.
In the Fantasy Game, Ender keeps dying to the Giant in his version of the Kobyashu Maru, and eventually kills the Giant by thinking outside the box. In a video game, he doesn't mind killing because it isn't real, and it sure beats dying.
Ender is tricking into killing an alien species because he thinks he is playing a game BUT the most important part is the end (and the entire rest of the series) in which Ender discovers the truth. He also discovers there is one alien left alive, who doesn't hate him. And Ender vows to find a safe planet for the last Hive Queen to right his wrong. The Buggers are perceived to be evil and abhorrent, when in reality they aren't if you get to know them. Ender writes a book called The Hive Queen in defense of his former enemy.
Jane, the first AI in the universe comes out to Ender because she knows he is tolerant and will accept her.
He also writes a book called Speaker of the Dead in which he says we must speak truthfully in all things about a life to really know someone.
When Humans then encounter their next alien species, Ender works to prevent another Xenocide and preaches tolerance.
The book doesn't advocate genocide/xenocide. It isn't about training kids to that end. It is a cautionary tale of how prejudice can lead to horrible mistakes, about empathy and tolerance. You either never read the book, or you have terrible reading comprehension.