Agreed. When I'm hiring developers, when they tell me they only want to work in certain languages, it's almost always a red flag in terms of their overall problem-solving ability. Just my experience though.
What about if they say they are only fluent in certain languages at the moment while having a basic knowledge in the languages that you use? Do you look more for ability to solve computer science and discrete math problems?
Pretty much. I don't really care if you know the languages we use because you'll pick it up in the first couple of weeks on the job. People who can really solve problems are rare.