This happened to me in my current role, where I didn't know the language and I told the interviewer. Our solution was that I was allowed to do the interview with a language guide up on the side, so I could refer to syntax in the language if I needed to. He was also understanding of the fact that I may not know idiosyncracies of the language due to inexperience with the language. Eventually, based on the skills I did show and that I was able to learn "on the fly" (it really was on the fly, I had no experience with the syntax whatsoever prior to the interview), I ended up getting the job.
That said, this is not usually how it works. Usually, you are expected to know the skills required for the job before you do the interview. If you don't, that's pretty disqualifying; you're going to come into this job as a junior-level because you don't know how to use the tools. I've definitely been disqualified from roles for this reason as well.
My one concern though, is that your current language set is not available on HackerRank. HackerRank supports pretty much all major languages used these days. If you don't know any of the languages supported by HackerRank, then your language may be obscure, or at least sufficiently obscure that you will find a hard time changing jobs. Perhaps you may want to learn a more widely-used language solely for that reason, and you may want to try instituting some of that language into your current role as practice (just say "I think this language might be good for this application", don't tell your boss you're looking to learn a new language to interview with other companies). I've definitely learned other languages while working at companies that were not my "main" language; I haven't worked in my "main" language for about 20 months now, to the point that I don't even have a "main" language, per se, anymore. You may want to look into something similar, to widen your field.