In case someone else got the same issue, I did this to fix my issue:
Update Gems1sudo gem update --system
Uninstalled xpreproj1sudo gem uninstall xpreproj
Make sure to select All versions
Uninstalled Cocoapods1sudo gem uninstall cocoapods
Install xpreproj1sudo gem install xpreproj
Install cocoapods1sudo gem install cocoapods
Run1pod --version to test.