You can only deduct your temporary living expenses if your work was temporary, which means it was not expected to last more than one year. That doesn't mean whether you expected to work there for more than one year. It means that the job itself was temporary in nature. Like a construction job to build one building, and after it was finished the job would be over. If the work was indefinite in nature, you would not be able to deduct your expenses.
IRS
Publication 463 discusses this, under Temporary Assignment or Job.
**Say "Thanks" by clicking the thumb icon in a post
**Mark the post that answers your question by clicking on "Mark as Best Answer"