I'm not sure why, but I was able to resolve the issue by following these steps:
1.Turned on "Advanced Data Protection for iCloud" in iCloud settings.
2.Added a "Recovery Contact" in iCloud settings.
3.Went to Xcode -> Preferences -> Accounts and signed in again with the same account.
Alternatively, the issue may have been resolved by some server-side error on Apple's end that got resolved over time. Just for reference.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: