You're confusing the general "don't limit yourself to one language" which is good advice, with the specific "OP's problem in the past year has been that they know Java and are looking for Java roles" which the GP commenter has no way of knowing and is extremely unlikely to be the case.
Just assume you made a confusion when you got the wrong understanding to state it is a bad advice. You can do that in place of trying to change OP to fit a narrative.