As a senior developer should I learn more than one technology or will it be better for me to just leave a company?

As a senior developer should I learn more than one technology or will it be better for me to just leave a company?

I am working as a full stack .NET software engineer for some time now. My company expects me to learn Java Spring Boot. My question is, will it be more beneficial for me to stay and learn the Java Spring Boot or will it be better for my career to become a stronger expert in just .NET?

Please don’t downvote the question. If it is offtopic for the Software Engineering SO, let us just delete it. Because I do not know if it is offtopic.