I have faced the same issue on Xcode 11.6 with MacOS Big Sur (11.2)
I have a remedy for what I need. I only needed to build a project that only supports Xcode 11.6 or a previous version.
I build my project on Xcode 11.6
I archived the project on Xcode 11.6
close Xcode 11.6 and open the same project from Xcode 12.4 (Yes I have both Xcode versions installed.)
Windows -> Organizer on Xcode 12.4
Then continue the distribution wizard without any trouble.
I know this is not the answer for all of your situations but hope this will help someone in a similar situation to mine.