Gradle isn't serching the right repository for plugins

Nah, I think what he showed is the build script of build-logic where it is correct to define the repository as production repository.

Am I right, that the plugin also is building fine, but then fails when it tries to apply it?

Repository configuration does not propagate from producer builds to consumer builds.
You defined the papermc repository for building the plugin and the building probably works, but that is completely independent for various very good reasons from the repositories when using the plugin.
Add the papermc repository in the pluginManagement { repositories { ... } } block of the settings script of the build that applies the plugin so that the build can find all the dependencies the plugin is using.