Promoting the answer in the comments to an answer, because it’s the actual answer:
This appears to be a bug in the IntelliJ Kotlin plugin v1.2.40 and how it interacts with Java 10. See here. The solution is to upgrade to v1.2.41.
(Don’t switch your project to building with Gradle like the other answer suggests just because the plugin is broken. That’s weird.)