How do I migrate a C++ script to a project as a Blueprint?

The message explains it clear as can be. Your blueprint is already deriving from a c++ class but that class is invalid most likely meaning it doesn’t exist. You need to go into what ever project you are taking the blueprint from → Open the blueprint → click on Class Settings at the top of the blueprint editor and check what class it derives from. Then move that c++ class to your new project before moving the blueprint.