As long as you need.
There are lots of variables that affect how long wooden objects lasts, so unless you are writing for an audience with specific interest in such things the standard is simply provide a plausible excuse why it has lasted as long as it has. With your "science based" tag the bar is raised slightly for this answer but there is still no real reason to do math or provide hard numbers. Why would they know or care how old exactly the door is, right?
So what do you need to consider?
Biological decay by micro-organisms is the fastest and the one that you absolutely must explain away. This is probably not still important enough to justify actual exposition about the specific conditions but a few mentions scattered in descriptions will be good to do.
Bacteria and fungi need moisture. Ancient salt mines have some nice wooden objects that have survived for millennia. Similarly arid deserts can protect organic objects from bacteria. This is probably not what you want but you should have good drainage and decent ventilation in areas where you want wooden doors to survive. If everything is covered in mould and slime you'd need a very good excuse to have a door survive.
The wood used might be toxic or otherwise resistant enough to protect itself. Trees have evolved toxins and defensive structures to protect themselves from disease and parasites. While this is hard to quantify, it is a real "science based" thing and well suited for your needs.
As AlexP mentioned the doors have material value and a door made from a special kind of wood that can resist decay would be valuable enough that the characters would reasonably recognize it as valuable. And specifically valuable because it lasts long. And while players do not really care about how old your door is, they do care about how much it is worth in gold and won't mind an explanation why. It helps in finding the buyer with best price.
It might be treated with protective treatment. A wood that is properly dried and lacquered will be safer from decay from insects, fungi and bacteria. Rats too. Here you will need to consider the structure of the door. If your hinges are attached with screws, the holes will give bacteria a way in and your door will eventually fall down and decay from inside.
In general, despite it being bit off-topic, remember to think about how the door is attached. Players probably won't notice but who knows what people will notice. Your attached hardware should not compromise the door structurally and be itself resistant to decay. This would probably mean metal in dry conditions and a construction where the wooden door is essentially held within a metal gate with hinges and locks connected to the metal structure.
Next issue is chemical decay. A door immersed in boiling acid will not usually last that long despite being fairly safe from bacteria. Dungeons would generally be cool enough for heat not to be an issue but some fantasy dungeons have lava. Avoid that if you want wooden doors. The dungeon might also be in an area cold enough that it is always below freezing. This would slow down chemical reactions and also protect from most biological decay.
Your dungeon might also have been protected by inert gases. Oxygen is corrosive so not having any would make most things last lot longer. Low oxygen levels also protect from much of biological decay, insects, rats, and humans. Anoxic water or mud may apply but is probably not what you want your dungeon. Although having the dungeon be immersed in anoxic water for millennia until the waters subsided just last week is an option. Problem with such immersion is that while the wood can last long, its structure suffers and it may not be durable afterwards.
Physical processes also need to be considered. If your dungeon is intact after centuries it usually has environment static enough that erosion is not a major issue but even so fantasy dungeons can sometimes be weird. If your corridors have strong winds or flowing water or the doors keep moving that will cause physical erosion. I am really mentioning this for completeness since wood usually decays before physical erosion is an issue but it would be fairly embarrassing to protect your doors from bacteria and then be pointed out that the method you used to do so would have physically eroded the wood. So no fast moving gases or liquids even if they'd have a preservative effect.
Last thing to note is that you want to be clear whether the doors survive because of fortunate conditions, really good construction or because somebody went to lot of bother to preserve them. For a fantasy dungeon it is entirely plausible that the dungeon and the doors within were specifically designed and constructed to be functional six hundred and twenty-seven years from now when the prophesied redeemer enters.
Also do not be afraid to say "magic". Fantasy doors built to last would quite plausibly have some protective magic on them. And making the doors immune to normal biological, chemical decay and physical erosion would be a natural side effect for even fairly weak protective magic to have.