If the main reason for the failure of the Winter War was incompetent leadership due to the purge, why did the Soviet army succeed against the Japanese?
Other factors helped the Soviets in the Far East.
First, the terrain: compared to heavily forested Finland with many lakes and rocky outcroppings breaking the terrain further, Manchuria was more or less open plain, perfectly suited for the Soviet mechanized combat technique and penalizing the Japanese, who had far fewer tanks. Had Finland's terrain resembled Manchuria's, it alone would probably have all but guaranteed a relatively swift Soviet victory.
Second, Japanese hesitation to escalate the conflict: apparently, the Japanese did not want an all-out war and refused to plan operations elsewhere along the Japanese-Soviet border. This allowed the Soviets to concentrate their best units at Khalkhin Gol, where the actual battle was taking place, without fear of Japanese counterattack elsewhere.
Third, leadership: even though the Soviet army was still reeling from the purges, the mastermind of Khalkhin Gol two-pincer envelopment attack (which trapped the Japanese 23rd Division and ultimately brought about a ceasefire) was Georgy Zhukov, later known as the defender of Stalingrad and a Marshal of the Soviet Union.
Nevertheless, it should be noted that the Soviets weren't happy with the performance of the Red Army: other battles than the final, decisive one had been more or less stalemates. Despite having very large advantages in technology, numbers, and firepower, the Red Army suffered huge losses, largely because of poor leadership. Therefore, the Soviet success was at best a qualified one.
However, this lesson came too late to have much influence in the conduct of the Winter War, yet alongside lessons from the Winter War, were likely very important for the Soviet military reforms that followed.
Soviet military leadership had deeper problems than just the purge. For example the initial command was given to Kliment Voroshilov, something of a Stalin favourite but never a particularly good commander. He was replaced by Shaposhnikov and Timoshenko who proved more able. At Khalkin Gol the Soviets started with better coomanders, including future star Zhukov.
Also as I recall Khalkin Gol was preceded by a build up of troops and material, while the Winter War was somewhat rushed. Redeploying and massing forces ended up being pretty decisive after Voroshilov was moved on.