He’s not.
If the Epilogue happens 19 years after the story, why is Teddy Lupin seen on Platform 9 3/4? He would have been born shortly after Book 7 starts, which means he would have been 19 years old at this time, two tears older than the most senior Hogwarts students.
The answer to this is simple. Teddy was not on Platform 9 3/4 that day to actually get on the train to Hogwarts. James says:
“Our Teddy! Teddy Lupin! Snogging our Victoire! Our cousin! And I asked what he was doing –” “You interrupted them?” said Ginny. “Your are so like Ron –” “– and he said he’d come to see her off!”
DH pg 756/605
And although it doesn’t say it, we can also pretty easily guess from the clues about their cousin and her French name, but J.K. has confirmed, that Victoire is Bill and Fluer’s daughter.