Accepted a job in another state to find out the contract for the program ends in a year

r/

Location: Oregon.

I accepted a job offer for a position that required me to move to another state. About a month or so into the job, I find out that the contract for the program I am on is up in a year and if the client decides to go with another company, I’m out of a job.

Nothing was said about this at all during my interview or the two month waiting period between accepting the offer and moving states.

Is this legal for a company to do this?