[deleted]
While it may seem odd that Hannibal chose Generals all within recent memory he had good reasons to do so. Alexander the Great is a great choice for greatest general of all time because of the scope of his expansion in such a small (relatively) amount of time especially being outnumbered in almost all of his battles(Gaugamela being his most famous). Pyrrhus of Epirus is also a good choice for being pretty high on the list (though i dont think he'd be considered that high now) because of his wars in southern Italy and Sicily. He is even the namesake behind Pyrrhic victory, though i dont know it thats considered a good or bad thing. Likewise even though Hannibal chose himself he had good reason to do so. He had many notable victories under his belt (Cannae and Lake Tresimene being the biggest ones). He held together an army that spoke many different languages in enemy territory for years and won battle after battle.
Also the other generals you mentioned were pretty good but just not on the level of the other three. Leonidas' most famous battle is one in which he lost. It was a very great last stand but you just cant put him above any of the others when his whole strategy was to wedge his infantry in a bottleneck and wait. The other Generals just dont have the masterpieces that Hannibal and Alexander are known for. Alexander laid siege to city of Tyre that was an island fortress that was almost impenetrable by conventional assault. Instead of giving up or moving on, he just built a land bridge out into the sea towards the island and captured the city. The city of Tyre in Lebanon now still has no small island off the coast because the landbridge still stands. And Hannibal with his victories in Roman territory were technical masterpieces. He achieved something that had never been done before at Cannae when he completely surround a numerically superior force and destroyed them almost to the last man. 50,000 Romans were killed in a single day. That amount of bloodshed would not be matched until WWI.
It may seem odd that Hannibal chose men that lived in such close proximity to him but the reason for that is just that they were considered at the time to be better generals. While the others may have been Great Generals in their own time, the other three were great generals of all time or in some way made some unique imprint on history