Eclipse and migration from Java 1.8 to 17

We are moving a Gradle plugin from Java 1.8 to Java 17.

Currently gradlew build is going ok and the code is working without problems but when we open the project in Eclipse we obtains, in the import section, a lot of messages like:

The package javax.xml.transform is accessible from more than one module: , java.xml

Checking the type hierarchy of the classes involved in the issue (i.e. org.w3c.dom.NodeList):

Type_Hierarchy

We see the problem seems to be in a conflict between gradle-api-8.0.jar and jre.

Any idea about how to solve it?