The Triforce keeps him from dying, but he loses it in the games that he actually dies in. The oldest game is, well, old, and they didn't have a whole lot of backstory about the Triforce at the time. Meaning basically that back then having the Triforce of Power meant he was more powerful, but it didn't mean anything about dying.
There are three games in which Ganondorf loses the Triforce and apparently dies. Those are
1: The original LoZ - As I had stated, there wasn't much backstory, so it wasn't like Ganon losing the Triforce was a huge deal. Shoot him with a magical silver arrow, and he's dead.
2: Twilight Princess - As Ganondorf (human), the Triforce symbol is shown losing its glow on his hand after being impaled by the Master Sword. We know the Master Sword is more than just a blade and that it has the power to repel evil. Thus, Ganondorf being evil, the Triforce of Power fueling that evil, means that if the Master Sword is jabbed through him and left there, it would slowly drain his power, life, and even the Triforce of Power from his body.
3: Wind Waker - As Ganondorf (human), he finally gets the three pieces together atop Hyrule Castle during the final battle. Therefore, all three pieces leave Link, Ganondorf, and Zelda, so neither has them anymore after this point and apparently don't have them again considering this is the last big game on that side of the storyline (so far). However, the King of Red Lions wished on the Triforce instead of Ganondorf, then the Triforce left. So Ganondorf, after being stabbed through the head by the Master Sword, would then die, or in this games case turn to stone, which is basically dying as well.
Some might also say Ganon has the complete Triforce in A Link to the Past, however we know he wished upon it, we do not know that he actually has it all in his possesion (as in using the full power at his will). Seemingly, Ganon merely has the relic held within the Pyramid which he has made his base. Whether or not he has control over its power at this point in time has never been confirmed, as no one really knows how Ganon managed to get access to the Triforce for a second time historically. But apparently, like in the original LoZ, the Silver Arrows carry a power similar to, if not greater than, the Master Sword itself. A power so great, that it can destroy Ganon and pull the Triforce of Power from him.