Personally however I'd say he is most like Peter Pan.
To start with Pan and the Doctor are both immortals. Pan is an eternal boy and, whilst the Doctor does age, whenever he gets too old, he just becomes younger again.
The Doctor and Pan are both childish and immature characters. Neither want any responsibilities and just want to have fun for the rest of their lives. They also can be a total asshole to their enemies like here.
Both are also asexual. Pan is obviously a child, but even then he doesn't have any romantic feelings for Wendy and just views her as a mother figure.
The Doctors companion and Wendy also I feel fulfil a similar role to both heroes, in that both are the sidekicks who are often young and impressionable and who at first are in awe of the Doctor and Pan, but then they grow up and have to leave him behind. The end of the Green Death is kind of a classic Peter and Wendy situation.
The Doctor and Pan however just go on taking on more impressionable young people as their sidekicks, repeating the process, seemingly forever.
The Doctor and Pan though heroes can also be interpreted as quite villainous characters.
In fact ironically in the original versions both were villains. In the original Pilot the Doctor is violent, sadistic and electrocutes Ian before abducting him and Barbara against their will. Even in the reshot version he's still ruthless and later willing to murder innocent people, like Barbara who he's happy to leave to die in the Daleks.
In JM Barrie's original version of Peter Pan, Pan abducted young children to play with, but when he got bored of them he murdered them! He was the threat Wendy was trying to escape from, but Hook was later added I believe simply for practical reasons. Even then however in the finished draft Pan is a borderline sociopath, and later Once Upon A Time famously restored him to being a villain.
I think the Doctor and Pan are quite unique this way. There aren't many characters you could have switch from being a hero and a villain and not really change who they are. Like take Superman. If you were to have an evil version of Superman you'd have to change everything about him. His morality, upbringing, his parents, his moral code etc. Even Angel is a completely different character too when he is evil.
With Pan and the Doctor however the basic idea of them is actually quite sinister. You have this selfish little boy who never grows old, never wants any responsibility and who abducts other young vulnerable children and makes them do what he wants all the time, and seemingly doesn't care about them at all. Also the idea of never growing up can either be taken as someone who is quite sweet and innocent, or someone who is lazy, selfish and immature.
With the Doctor you have similarly have what can be quite selfish character, who is a straight up liar, manipulative, and not always for the greater good. Sometimes just so he can get his own way.
He's also always willing to murder his enemies and never shows any guilt about it. Think about it, just how many heroes do you know that commit genocide over and over again? How many supposedly family friendly heroes shoot people without any guilt, stab them, burn them alive, feed them to wild animals and joke about it, drop them in acid baths, smother them with cyanide?
Also he is shown to be willing to at least risk innocent people just for his own curiosity like in Caves of Androzani and the Daleks. Even his own grand daughter!
Also much like Pan what the Doctor represents can either be good or evil. The Doctor is a scientist who is willing to do whatever it takes in the name of discovery. You can either see him as an Albert Einstein, wild haired professor, or a callous, ruthless monster who sees human life as expendable?
With a little bit of adjusting you could have the Doctor and Pan be evil and not change their motivations, their way of doing things, much of their personality, and what they stand for, as indeed they did in Once.
There is obviously a lot of Sherlock Holmes in the Doctor too. He is that insufferable genius type, and in some ways is a very old, wise and mature character too when it comes to solving problems. Still I think there is a Peter Pan aspect to the Doctor that's quite strong.