I am having this issue too. I have narrowed it down to the colon (which is prohibited in build files). Looks to be related to the local file reference to the SwiftPackage although I wouldn't expect that you have to remove it before archiving.
Post
Replies
Boosts
Views
Activity
Did you manage to solve this? I am experiencing the same issue
It also appears to be happening only when using Swift 5.3, Swift 5.2 compiles it fine. For reference I am trying both in Xcode 12.0.1.
In the Metrics section, you can use the first drop-down to be "active devices" and then in the other dropdown you can choose "app version"