Try restarting XCode.
I know, it sounds like something straight out of "The IT crowd" (Have you tried turning it off and on again??!), but it worked for me. Not only for this error, but other XCode-related errors as well.
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags: