An enlisted man or woman who has been dropped as a deserter shall not be restored to duty without prior disposition of the charge of desertion standing against him or her. The charge shall be disposed of by trial by court-martial; by restoration to duty, desertion admitted, upon a written application of the soldier admitting the desertion; or by the setting aside of the charge of desertion in case it had been erroneously made.