I am not that efficient in switching language (afraid I might mess up the syntax for Eg
You should just ask the recruiter (and double confirm with the interviewer when the round comes). Some roles/interviewers are more flexible than others. At Meta, I allowed candidates to use any language they wanted, but back in my day, most new engineers went through bootcamp so they shouldn't have been tied to any 1 language.
What I will say though is that if the role is a heavy Java role and you aren't able to write good enough interview Java, it's not likely you would be able to write production-level Java were you to get the job.
For the most part, yes. I'd phrase this to the interviewer as:
I prefer Python for interviews since it's less verbose, but I can get by in Java as well. LMK if you'd like me to switch.