Erm, that's because Mystery Gift files, the specific wonder cards, are supposed to be used in their own generation.
It's not an error message. It is literally telling you that you are doing it all wrong.
Like, you can't redeem a Gen 4 wonder card on a Gen 7 save, that doesn't make sense.
Normally, you're supposed to redeem it on a Gen 4 game, THEN transfer the pk4 all the way up to Gen 7.
In any case, drag the wonder card to the left window of PKHeX. It should mimic the redemption and transfer procedure.