Napoleon actually successfully invaded Russia, and he took the seasons into account. What he didn’t count on was the Russians deliberately going scorched earth on their own territory and even setting fire to their own capital.
For several days Napoleon sought to parlay with Tsar Alexander after capturing Moscow, hoping to reach a settlement. The Russians wisely kept him and his army waiting until they were forced to begin retreating due to a lack of supplies.
In other words, your explanation is that Napoleon failed because he assumed that his enemies were idiots.
Usually, when a dictator or wannabe-dictator overextends their forces and fails, it's because they didn't know what they were doing. But Napoleon was an experienced military commander. He understood the importance of logistics, and he should have assumed that his enemies understood it as well. He knew Russians had resorted to scorched earth defense before, and his forces had already faced it in Portugal earlier.
Also, Napoleon didn't reach the capital. At that point, Moscow was just a major city with symbolic importance. The capital had been moved to St. Petersburg about a century earlier.
Where do you get that notion? Hindsight much?
Not every enemy burns their own capital out of spite because they can't fight back. Actually, this almost never happens, so if you were following the typical scenario based on prior history, this would be very unlikely to happen.
Scorched earth is what Russia does. Peter the Great had used it to repel the Swedish invasion during the Great Northern War. Napoleon himself had studied that invasion and tried to learn from it. Instead, he repeated the failure of Charles XII on a larger scale.
Napoleon himself had faced scorched earth in Portugal during the Peninsular War a couple of years earlier. It was effective.
In other words, Napoleon knew that Russia had a habit of using scorched earth, and he knew that it was effective against his forces. The reasonable assumption was that Russia would use it again.
Also, Moscow was not the capital, and Napoleon had already lost the majority of his army before reaching it.
In 1812, Napoleon suffered huge losses in the first weeks of the invasion, before fighting a single major battle. His army could not find enough food in Russia. In 1941, the total number of Axis military deaths during Operation Barbarossa was comparable to what Napoleon suffered in those first weeks, despite many battles and much larger scale. When the invasion failed, the troops mostly just stayed there and tried again next year.
They were not burning capital "out of spite". Not everyone is like French who surrender Paris to protect art.
Russia was not sitting still, While Napoleon was busy fighting in Spain, Russia with the Tsar Alexander was attacking Sweden and Turkey - they were just as expansionist as ever. There were rumors that Russia was going to march on Warsaw next, too. Russia was also preparing for a larger army to go further into Europe. Both countries were preparing for a clash, and it does not really matter who stroke first.
The same thing happened between Hitler and Stalin in 1941: they distrusted each other's and both eventually had plans to turn against each other.