Compiling Marlin apparently has the apparently non-documented requirement that you need to have a compiler (gcc) installed in your system a quirk in Windows related to finding the compiler executable correctly, which may be related to the PlatformIO core, but can still be solved by installing GCC globally.
This was already covered in PlatformIO cannot compile Marlin for the LPC1769 environment - #2 by maxgerhardt.