How to Return a variable from Kotlin method when is invoqued in a JavaFX file

I’m having a problem when trying to return a variable from a method in Kotlin. I have my UI developed using JavaFX and I need to display a variable on it so I need to get the variable from my Kotlin Kode but I always get the error “Error:(73,65) java: incompatible types: void cannot be converted to int”

Ay ideas?