Two reasons why this could be possible (correct me if I'm wrong):
Harry eventually became the owner of all the Hallows. The cloak of invisibility (from his father), the elder wand and the resurrection stone. (is he still the owner if one is broken and one is lost? And does Master of Death mean immortal?)
Trelawney's prophecy is as thus:
"The one with the power to vanquish the Dark Lord approaches... born to those who have thrice defied him, born as the seventh month dies... and the Dark Lord will mark him as his equal, but he will have power the Dark Lord knows not... and either must die at the hand of the other for neither can live while the other survives... the one with the power to vanquish the Dark Lord will be born as the seventh month dies...."
Pay particular attention to,
and either must die at the hand of the other for neither can live while the other survives...
Does this mean Harry can only be killed by Voldemort?