distribution certificate not working

The Apple Distribution certificate is present in the login Keychain, as well as the Development one. In Xcode preferences both are visibile and valid. In Xcode target only the development certificate is present and I'm unable to set the distribution one. For this reason my last app has been refused on the Apple Store Connect. How can I set the distribution certificate on the App target?