Yes. Employers have the right to set the terms and conditions of employment. This includes requiring you to work from home even though it is not your preference, as long as they are complying with the law.