Ender first learns to control himself and his army in battle school. He also learns he has to trust himself and no one else. Initially as a soldier, then a toon leader, then a commander.
From day one as a soldier, Ender is intentionally set apart from the rest of his army. Ender has to learn to overcome this by making friends and fitting into the group.
Next he learns to start his own army; controlling a small group.
Then as a commander, he has his own army and directly controls the actions of his soldiers.
With each step, Ender understands more and more that there are no adults who will save him. When he is challenged, he has to figure out how to handle it on his own.
By learning to control himself and those around him, and by knowing that no one will save him (and as an extension all of humanity) if he fails, Ender matures into an adult by the end of the book.