• The moon has much more limited scientific value compared to Mars. Mars has a 4 billion year history that may have included life and may still include life.
• Despite that much greater distance due to Aerobraking Mars takes less fuel to land on and it's easier to land large cargo ships on.
• Mars has far more resources, it's awash with water and CO2 making fuel production easy, and metals are literally laying about on the surface. The moon is a desert of rocks and dust that only has water in polar craters that is likely mixed into rock percentages at absolute zero.
• Mars is far easier to survive long periods on. The moon is a desert of dangerously razor sharp dust that alternates between two weeks of intense heat and two weeks of near absolute zero temperatures. Mars atmosphere is thin but it means it's temperature ranges are far less extreme, and it's surface soil has been eroded. It also has a lower radiation environment, but that's a minor concern. Most importability water and CO2 and metals are easy to access.
• Returning people from Mars is much easier than the Moon because high volume in-situ fuel production on Mars is easy, while probably not going to be possible on the Moon for decades.
Virtually all lunar research can be done tele-robotically since it's only 3 seconds away. That's impossible on Mars, where we've had a robot trying to dig a hole for over a year. Sending humans to Mars will vastly increase our scientific knowledge of Mars, they will explore more of Mars in a few weeks than rovers have in 50 years.
The answer is send more robots to the moon, but send the astronauts to Mars.