Can moving expenses be deducted only for a new job?

I looked at the IRS instructions https://www.irs.gov/publications/p521/ar02.html#en_US_2016_publink1000203446 but I am confused whether moving expenses are reserved for people who get a NEW job?

I worked remotely for my company from Dallas, TX.

My company has an office in San Francisco, CA and I moved to California and I now work to the office company in San Francisco.

Can I deduct my moving expenses or I do not qualify because I did not get a NEW job in a NEW company?

Thanks