Yes, but only if the temporary job was just a temporary work location with the same employer
"Travel expenses paid or incurred in connection with a temporary work assignment away from home are deductible. However, travel expenses paid in connection with an indefinite work assignment are not deductible. Any work assignment in excess of one year is considered indefinite. Also, you may not deduct travel expenses at a work location if it is realistically expected that you will work there for more than one year, whether or not you actually work there that long. If you realistically expect to work at a temporary location for one year or less, and the expectation changes so that at some point you realistically expect to work there for more than one year, travel expenses become nondeductible when your expectation changes."
Travel Business Expense