Check the accepted answer here: Building a self-executable JAR with Gradle and Kotlin - Stack Overflow
This, too, has more or less the same solution: Kotlin Basics: Create Executable Kotlin JARs, using Gradle | by Preslav Rachev | Medium
Funnily enough someone else had the same problem and while you asked him questions you never solved it. The last message links to a solution similar to mine: Build jar with IDEA throws error but fine with Gradle - #6 by jajacomp