Are you using the latest Marlin code base? There were changes that needed to be done regarding PIO core 5 which only allows package installation from the trusted PlatformIO repository.
Also see thread at Marlin: Help me ERRROR ModuleNotFoundError - #11 by maxgerhardt.