Chances are he’s been roaming up and down the world looking for the Avatar, or leads that might help in his search for him, for years. We know already that by then he’s already visited the Western Air Temple, and presumably the other Air Temples as well, with no luck. The South Pole was probably a desperation move, and he lucked out.
Though that’s hardly the only conveniently contrived coincidence in the episode.
I mean, what’re the odds that Katara and Sokka would stop right there for Katara to throw her little tantrum at the exact spot Aang happened to be, and thereby somehow wake him up?