In my case previously I was using the below one in pom.xml
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.141.59</version>
</dependency>
I removed the above one and replaced with this
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.0.1</version>
<scope>compile</scope>
</dependency>
It worked and "until(java.util.function.Function) in FluentWait cannot be applied to" this error gone from my IntelliJ class.
Something is deprecated or not working in newer selenium jar version. so use old one.
You can also add following dependency specifically in pom.xml and check.
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-support</artifactId>
<version>3.0.1</version>
</dependency>