Did you set the DefaulPawnClass in your gamemode? And are you using that custom gamemode in your level? If that’s not the case then Unreal uses the default gamemode and therefore also the default spectator pawn. You can set the gamemode either under your world settings, or Project Settings → Maps and Modes.
On a side note, there are also probably easier ways about implementing movement, such as inheriting from ACharacter and calling AddMovementInput.