I believe that Kotlin compiles down to execute on a JVM like Mendix. You should be able to create a .jar file in Kotlin and put that into the userlib of your Mendix application. You can then use a Mendix Java Action to call classes and methods in that .jar file.
Hope this helps.