It sounds like you didn't prepare the phone by going into Settings > Developer options and activating OEM unlock, and removing the Google account.
If Factory Reset Protection (FRP) has become activated then you are in big trouble as this Google security protection is (as far as I know) un-breachable.
There have been loopholes exploited (try looking at Root Junky latest bypass options) but many loopholes have been filled by Google to maintain FRP integrity.
[ Login above or register to see download links. ]