Scala 3 project build issue : scala compiler and scala library inconsistencies

Hello, I am trying to compile a scala 3 project with gradle .

The build is faling but as you can see in the logs the wrong scala library version si picked.
I am using scala 3 but library 2.13.12 is picked :

unhandled exception while running posttyper on  [...] ProcessorLive.scala

  An unhandled exception was thrown in the compiler.
  Please file a crash report here:
  https://github.com/scala/scala3/issues/new/choose
  For non-enriched exceptions, compile with -Yno-enrich-error-messages.

     while compiling: /mnt/c/dalhy/heatws/src/main/scala/fr/edf/dtg/dalhy/services/HeatWSProcessorLive.scala
        during phase: posttyper
                mode: Mode(ImplicitsEnabled)
     library version: version 2.13.12
    compiler version: version 3.4.1
            settings: -Xunchecked-java-output-version 8 -bootclasspath /home/loic/.gradle/caches/modules-2/files-2.1/org.scala-lang/scala-library/2.13.12/[...]

The probleme seems to be with the bootclasspath parameter. I’ve tried some exclude and version force policies as you can see in my build.gradle file :

plugins {
    id 'scala'
}

version = "1.0.0"

configurations {
    runtime.exclude group: "org.scala-lang", module: "scala-library"
}

configurations {
    all {
        resolutionStrategy {
            eachDependency { details ->
                if (details.requested.group == 'org.scala-lang') {
                    detail.exclude(group: "org.scala-lang", module: "scala-library")
                }
            }
        }
    }
}
ext {
    scalaMajorVersion = '3'
    scalaVersion = "$scalaMajorVersion.4.1"
}

dependencies {
    zinc ("com.typesafe.zinc:zinc:1.9.6"){
        exclude( group: "org.scala-lang", module: "scala-library")
    }
    zinc "org.scala-lang:scala3-library_3:$scalaVersion"
    implementation "org.scala-lang:scala3-library_3:$scalaVersion"
    implementation "com.softwaremill.sttp.client3:zio-json_$scalaMajorVersion:3.9.5"
    testImplementation("dev.zio:zio-test_$scalaVersion:2.0.16")
}


tasks.withType(ScalaCompile) {
    scalaCompileOptions.additionalParameters = ["Xss16m"]
}

test {
    useJUnitPlatform()
}

Is there a way to fix this? Thanks !

Loïc