There are three possibilities:
- Jack may not be the Face of Boe. It's been hinted at numerous times, but never confirmed on-screen. Behind the scenes, RTD has said contradictory things ranging from 'We have no idea whether he's really the Face of Boe' to 'Of course he's the Face of Boe'.
- Jack is immortal in a unique sense, not the traditional one: in the Doctor's words, Rose/Bad Wolf brought him back to life 'for all time'. As a time traveler, he could have lived through every moment of the universe before dying. At the time the Face died in Gridlock, an earlier version of Jack was alive somewhere else at the same time.
- Jack is just 'nearly immortal'. As he himself as commented, he does age, albeit very slowly—it took him millennia to look a few years older. Maybe his life was extended long enough to live until the end of the universe, but with all of his time traveling it ran out a few billion years early.