Could you explain us what command you have executed, or program you have written, or copy-paste some part of the logs? It is very difficult to help with so few information
I think you are facing this problem while starting the kafka broker, could you please check kafka-run-class.sh script what scala version it is currently using and also share the output of "bash -x kafka-server-start.sh"