You write the first version of the compiler in Java, and then you compile the next version with the previous Kotlin compiler and so on. Lots of languages do this: GCC and CLang are written in C++, Rust compiler is written in Rust, ... It's called self-hosting:
https://en.wikipedia.org/wiki/Self-hosting