You were missing header includes in your project. You should have forward declared classes from the GameAbility plugin and then included the needed header files in your cpp file.
The use of GameplayAbilities also requires the module GameplayAbilities inside of your build files dependencies.