I got the same error today after Intellij upgraded my bundled kotlin plugin on Mac OS. The problem might not be the same, but the error message was identical.
Turns out before my project was using JDK 11, but after the kotlin plugin upgrade the JDK was upgraded as well to 13. I resolved the issue by dropping the existing JDK 11 with the -
button in the Project Structure window and then adding it again using the +
button - which selected JDK 13 by default. After that this error went away.