An enlisted person who has been dropped as a deserter shall not be restored to duty without prior disposition of the charge of desertion standing against them. 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 when it had been erroneously made.