After reading Robert Heinlein's Starship Troopers and Ender's Game, I have noticed them to be very similar. The enemy is similar. The training is similar. There is some similar philosophy, or at least it seems the way of philosophy expressed in dialogue is similar. You have said yourself that you have read Heinlein's work. My question is: to what extent is Ender's Game, if any, influenced by Starship Troopers?
I have never read "Starship Troopers." I HAVE read "Forever War" by Joe Haldeman, which is said by some to be a response to "Starship Troopers," but I did not read "Forever War" until after writing the short story of "Ender's Game." So "Starship Troopers" could not have been an influence, conscious or otherwise, on "Ender's Game."
One should keep in mind that the insectoid alien was a cliche in science fiction long before Heinlein used such creatures in "Starship Troopers." I assume that he used them for the same reason I did -- because what mattered to the story was not the alien species per se, but rather the fact that humans were at war, so a generic alien would do. (Of course, in the process of writing the novels we both, I assume, tried to make them more than generic aliens, but in choosing the alien type, going for the insectoid look-and-feel is hardly original.) And the tradition of writing about the training of young people is called "bildungsroman" and it's also very, very old.
In short, the resemblances between "Starship Troopers" and "Ender's Game" are coincidental -- Heinlein and I simply made a few similar choices in attempting similar projects.