Gradle Build file is order of dependencies important?

Hello All, I am new to Gradle coming from Maven background. I have a Java project using Gradle and I have added an sdk implementation to the dependencies. Unfortunately I am seeing some behavior in the IDE (Idea Ultimate) specifically the import statements in the class, that suggest older versions of the sdk need also be referenced. My question is, for multiple lines of implementation is there a priority order of entry to be followed? Does Gradle need to see Latest sdk first or similar? Thanks!

If I understood your question right, then no.
Gradle does not have such non-sense like Maven “nearest wins” or “first seens wins”.
If you have multiple dependencies on the same library anywhere in the dependency tree, the most likely helpful solution is to use the newest needed version as most often libraries are backwards compatible and that is what Gradle is doing by default.
It uses the latest of the requested versions.