I moved in July 2017 to a new job which began in August 2017. Do I qualify for the moving expense deduction for this year or will I file it in 2018?

I have not yet reached the 39-week minimum but will under my current job title. So if not this year, can I still file for the moving expenses in 2018 for a move that occured in 2017 once I reach the time requirement?