Not only could they take 20 years to build, you have to consider how long they will actually be useful for. If we over-provision solar, wind, and batteries for the next 50 years (to deal with intermittency), then the nuclear plants may only have 30 years of operational life to amoritise their huge upfront costs over.
If you consider the cost trends of these technologies, then nuclear energy looks like an economic dead-end[0], and that's before you factor in the costs of long-term waste management, possible large scale contamination in the event of an accident or attack, and the small but potentially significant increased risk of nuclear proliferation or breakout.
[0] https://ourworldindata.org/uploads/2021/02/Price-of-electric...