At any time within two years after approval by the convening authority of a court-martial sentence, the accused may petition the Judge Advocate General for a new trial on the grounds of newly discovered evidence or fraud on the court. If the accused’s case is pending before a Court of Criminal Appeals or before the Court of Appeals for the Armed Forces, the Judge Advocate General shall refer the petition to the appropriate court for action. Otherwise the Judge Advocate General shall act upon the petition.