Five years is not a lot of time. When John F. Kennedy called for the nation to land a man on the Moon and return him safely to the Earth, his advisers recommended a timeline of “before the decade is out” in order to give NASA some additional slack and to shift a possible failure into the next Presidency (his second term would have ended in 1968).
From his announcement in April of 1961, NASA had approximately 8 ½ years to develop, test, and validate the necessary hardware and methods for getting astronauts onto the Moon and safely returning them home. They succeeded, but had the money and the political consensus that enabled them to do so. But they also had 3½ more years than NASA does now. Granted NASA is much more capable now than in 1961, but many of the same deficiencies exist: there is no functional heavy-lift rocket, no functional spacecraft for deep space, and no lunar lander even under formulation. Humans haven’t been beyond low Earth orbit in 47 years. NASA now has five years to change that.
Human-rated space hardware is extremely complex and is subject to significant oversight in terms of safety and reliability. The last time NASA successfully designed, tested, and flew human-rated space hardware in less than five years was during the Apollo program.
Obviously, NASA has far more knowledge and experience for placing humans in space than it did in 1961, but it is primarily for operations in a low Earth orbit environment. Necessary hardware such as the SLS and Orion are still in the development and testing phase, not production, and a lunar lander project will have to ramp up from effectively zero. Even if NASA uses public-private partnerships to develop a lunar lander, all one needs to do is look at the commercial crew program to be reminded that this strategy provides no magic bullet for the timely development of crew-capable spacecraft.
The availability of commercial rockets, however, is a notable difference compared to the early 1960s, though size and mass constraints will be a real issue as they primarily serve customers in low Earth orbit. The Falcon Heavy is currently not rated to fly important NASA payloads, and though rockets like SpaceX’s Super Heavy and Blue Origin’s New Glenn should exist in coming years, for now, they don’t.