Yes, active-duty military members who relocate due to PCS orders, can deduct moving expenses. These include orders to a first duty station and orders when separating or retiring from military service.
For additional information, please refer to: IRS: Moving Expenses for Armed Forces