This is an appeal from a judgment in which the trial court revoked Appellant’s deferred adjudication community supervision and adjudicated his guilt for the third-degree offense of taking a weapon from a peace officer. See TEX.PENAL CODE ANN. § 38.14(b), (e)(1) (West Supp. 2023). On appeal, Appellant asserts that the trial court imposed an illegal sentence and that his judgment of conviction is void as a result. We vacate and remand. Background Facts The indictment alleged that Appellant committed the state-jail felony offense of attempting to take Officer Cory Wester’s firearm. See id. at § 38.14(b), (e)(2). However, the caption of the indictment listed the offense that Appellant was charged with as “TAKE WEAPON FROM OFFICER(F3) 38.14 Third Degree Felony.” It is clear from the record that the State, Appellant, and the trial court operated under the mistaken belief that Appellant had been charged with the third-degree felony offense of taking a weapon from a peace officer. The trial court conducted a plea hearing on August 9, 2021. In connection with the hearing, Appellant signed a written judicial confession. In the judicial confession, Appellant stated that: I am charged by indictment with the offense of TAKE WEAPON FROM AN OFFICER(F3) which alleges that in Ector County, Texas, I, PHILLIP DEAN GALINDO on or about 12th day of December, 2018, did then and there, with the intention of harming Cory Wester, intentionally and knowingly and with force attempt to take from Cory Wester, a peace officer, the officer[']s firearm. . . . . I understand the elements of the offense as alleged in the indictment and the consequences of a plea of guilty including the minimum and maximum punishment provided by law. I waive the reading of the indictment and enter a plea of guilty to the said offense. I do now hereby, in Open Court admit all of the allegations in the indictment or information now pending in this cause, or the lesser-included offense(s), as described herein, including any and all paragraphs alleged for purposes of enhancing punishment, and confess that I committed these offenses. . . . . I have agreed with the State to the terms and conditions of the plea agreement as follows: 1. I will enter a plea of guilty to the offense of TAKE WEAPON FROM AN OFFICER(F3) charged against me in this cause. . . . . 3. Defendant’s punishment will be set as follows: SIX (6) YEARS, DEFERRED ADJUDICATION. At the hearing, Appellant confirmed that he was charged with “the third degree felon [sic] offense of taking a weapon from an officer.” The trial court admonished Appellant that the range of punishment for a third-degree felony was imprisonment for a term of two to ten years and a fine of up to $10,000. Appellant then pleaded guilty to “the third degree felony offense of taking a weapon from an officer.” Appellant also made a judicial confession at the hearing that he, “with the intention of harming Kenneth Myers, [] intentionally and knowingly and with force, attempted to take from Kenneth Myers, a peace officer, the officer’s stun gun.”[1] The trial court found that there was sufficient evidence “to find the Defendant guilty of the third degree felony offense of taking a weapon from an officer.” The trial court then asked “is there a plea offer?” to which the prosecutor replied: There is, Your Honor. In exchange for his plea to the sole count of the indictment, he will be sentenced to 6 years deferred adjudication. Would pay a fine of $50.00, $290.00 in court costs, $25.00 to reimbursement fees. And the State would agree to — no, I think you already have an order dismissing — 1245 dismissing B-19-0081-CR, as well as dismissing a Misdemeanor 18-5549-CCL. Both Appellant and his trial counsel confirmed that this was Appellant’s understanding of the plea agreement. Following the terms of the plea agreement, the trial court placed Appellant on deferred adjudication community supervision for six years. The trial court also admonished Appellant that violating a rule or condition of his community supervision could result in a term of imprisonment from two to ten years and a fine of up to $10,000. See id. at § 12.34 (West 2019). The trial court also ordered Appellant to spend ten days in custody as a condition of his community supervision. Finally, the trial court entered an Order of Deferred Adjudication that placed Appellant on deferred adjudication community supervision for a period of six years for the third-degree felony offense of taking a weapon from an officer. On May 10, 2022, the State filed a motion to adjudicate guilt, then amended it, alleging that Appellant committed five violations of his community supervision conditions. A probation revocation hearing was held, and Appellant testified after the State presented evidence of the allegations. On cross-examination, Appellant confirmed that he had been charged with “third degree taking a weapon from an officer,” and admitted that he “[took] Deputy Corey Wester’s firearm off of his holster.” The trial court found all five allegations to be true and found that Appellant violated the terms and conditions of his community supervision. The trial court adjudicated Appellant “guilty of the underlying offense of taking a weapon from an officer,” revoked his community supervision, assessed punishment at imprisonment for a term of six years, and imposed a $5,000 fine. The trial court’s judgment adjudicating guilt reflects that Appellant was convicted for “TAKE WEAPON FROM AN OFFICER(F3)” and lists the degree of the offense as “3RD DEGREE FELONY.” Analysis We note at the outset that Appellant’s first court-appointed appellate counsel submitted an Anders brief and filed a motion to withdraw. See Anders v. California, 386 U.S. 738 (1967). Following the procedures set forth in Anders, Kelly v. State, 436 S.W.3d 313 (Tex. Crim. App. 2014), and In re Schulman, 252 S.W.3d 403 (Tex. Crim. App. 2008), we independently reviewed the record and concluded that these appeals were not particularly amenable to disposition under Anders. We noted as follows in that regard: [T]he indictment in this cause provides as follows: “[Appellant] did then and there, with the intention of harming Cory Wester, intentionally and knowingly and with force attempt to take from Cory Wester, a peace officer, the officer’s firearm” (emphasis added). An offense under Section 38.14(b) is a third-degree felony if the defendant “took a weapon” from an officer. But an offense under Section 38.14(b) is a state jail felony if the defendant “attempted to take a weapon” from an officer. Thus, it appears that Appellant was indicted for a state jail felony but was convicted and sentenced to imprisonment for six years for a third-degree felony. See, e.g., Garcia v. State, 549 S.W.3d 335 (Tex. App.—Eastland 2018, pet.ref’d) (holding that an illegal sentence rendered the judgment void). (Statutory citations omitted). We granted original appellate counsel’s motion to withdraw, abated the appeal, and remanded the cause to the trial court with instructions to appoint other appellate counsel. New appellate counsel was directed to file a brief on the merits and address any substantive issues that appellate counsel deemed to be arguable. This appeal was reinstated after the trial court appointed new appellate counsel. In a single issue, Appellant asserts that his six-year sentence for the state-jail felony offense of attempting to take a weapon from a peace officer is illegal and that his judgment of conviction is void as a result. Appellant requests that we vacate his judgment of conviction and that we only remand the case to the trial court to conduct a new adjudication hearing. The State agrees that Appellant received an illegal sentence and that the trial court’s judgment adjudicating guilt is void. However, the State asserts that this court should (1) vacate both the underlying order deferring adjudication and the judgment adjudicating guilt, and (2) “remand the case to the trial court to allow appellant to withdraw his plea of guilty so the parties are returned to their original position before the entry of the plea bargain.” Thus, while both parties agree that Appellant’s sentence was illegal and that the judgment adjudicating his guilt is void, the parties disagree as to the proper remedy. Illegal Sentence We must first determine whether Appellant’s sentence was illegal. “An illegal sentence is one that is not authorized by law; therefore, a sentence that is outside the range of punishment authorized by law is considered illegal.” Ex parte Parrott, 396 S.W.3d 531, 534 (Tex. Crim. App. 2013) (citing Mizell v. State, 119 S.W.3d 804, 806 (Tex. Crim. App. 2003)). The indictment alleged that Appellant, “on or about the 12th day of December, 2018, did then and there, with the intention of harming Cory Wester, intentionally and knowingly and with force attempt to take from Cory Wester, a peace officer, the officer s [sic] firearm.” Because the indictment alleged that Appellant “attempt[ed] to take” Officer Wester’s firearm, it charged Appellant with a state jail felony. See PENAL § 38.14(e)(2). In that regard, the body of the indictment is the grand jury’s charge. See TEX. CODE. CRIM. PROC. ANN. art. 21.01 (West 2019). So, if the heading above the grand jury’s charge differs from the charging language signed by the grand jury foreperson, the charging language in the body must control. See Delarosa v. State, 677 S.W.3d 668, 677 (Tex. Crim. App. 2023). A state jail felony is punishable by confinement in a state jail facility for any term of not more than two years or less than 180 days, and a fine not to exceed $10,000. PENAL § 12.35. Because Appellant’s six-year sentence is outside the permissible range of punishment for a state jail felony, it is illegal. See Parrott, 396 S.W.3d at 534. The Judgment Adjudicating Guilt is Void We next address Appellant’s contention that his illegal sentence has rendered the judgment of conviction void. Void judgments are “rare situations in which a trial court’s judgment is accorded no respect due to a complete lack of power to render the judgment in question.” Nix v. State, 65 S.W.3d 664, 667–68 (Tex. Crim. App. 2001). “A void judgment is a ‘nullity’ and can be attacked at any time.” Nix, 65 S.W.3d at 667–68 (citing Ex parte Patterson, 969 S.W.2d 16, 19 (Tex. Crim. App. 1998)). In Nix, the Court of Criminal Appeals listed the four “very nearly” exclusive situations in which a judgment of conviction is void: (1) the document purporting to be a charging instrument (i.e. indictment, information, or complaint) does not satisfy the constitutional requisites of a charging instrument, thus the trial court has no jurisdiction over the defendant, (2) the trial court lacks subject matter jurisdiction over the offense charged, such as when a misdemeanor involving official misconduct is tried in a county court at law, (3) the record reflects that there is no evidence to support the conviction, or (4) an indigent defendant is required to face criminal trial proceedings without appointed counsel, when such has not been waived, in violation of Gideon v. Wainwright. Nix, 65 S.W.3d at 668 (internal citations omitted) (citing Gideon v. Wainwright, 372 U.S. 335 (1963)). In Wright v. State, the appellant collaterally attacked his original conviction on direct appeal from his probation revocation by asserting that his sentence was illegal. 506 S.W.3d 478, 481 (Tex. Crim. App. 2016). The Court of Criminal Appeals noted that an illegal sentence was not listed as one of the four situations in which a judgment of conviction for a crime is void under Nix. Wright, 506 S.W.3d at 481–82. The Wright court decided that, even if an illegal sentence could render a judgment void, “a sentence that can be upheld on habeas because the defendant has failed to show harm is not void under Nix.” Id. at 482. The court explained that an illegal sentence cannot void a judgment if an appellant’s claim would fail on habeas under the analysis set out in Parrott: In Parrott, we explained that even if Parrott’s sentence was illegal because of the failure to properly enhance with a prior conviction, the error was harmless because his actual criminal history supported the range of punishment within which he was sentenced and admonished. Such a sentence is not a ‘nullity’ that is ‘accorded no respect.’ Id.; Parrott, 396 S.W.3d at 536. Accordingly, under Wright, the record must contain no other indication that the punishment imposed could have been proper under any circumstances. 506 S.W.3d at 482; see also Garcia, 549 S.W.3d at 341. We have reviewed the record before us, and there is nothing in the record that could serve as a substitute to cure the illegality in Appellant’s sentence. Because the record does not indicate that Appellant had a criminal history that would authorize an enhancement of his sentence, the record “leave[s] no question” that Appellant’s illegal sentence is a defect that renders the judgment convicting him of the third-degree felony offense of taking a weapon from an officer void. See Wright, 506 S.W.3d at 482. The Order Deferring Adjudication of Guilt Must Also be Set Aside The State asserts that we should also vacate the original order deferring Appellant’s adjudication and remand the case to the trial court so that the parties will be returned to their original position before they entered into the plea agreement. The State cites this court’s opinion in Garcia v. State in support of its proposition, contending that Garcia is “nearly factually identical” to the case currently before us, and that it controls this case’s outcome. 549 S.W.3d at 335. The State is correct in making this assertion. In Garcia, subject to a plea agreement, Garcia pleaded guilty to the improperly-enhanced offense of possession of a controlled substance in an amount of less than one gram in a drug-free zone. Id. at 340, 345. Both parties and the trial court operated under the misunderstanding that the enhancement made the offense a third-degree felony, rather than a state jail felony. Id. at 339. The trial court found Garcia guilty, assessed punishment at imprisonment for ten years, suspended his sentence, and placed him on community supervision for ten years. Id. The State later filed a motion to revoke Garcia’s community supervision. Id. The trial court ultimately revoked Garcia’s community supervision and sentenced him to confinement for six years. Id. We determined that, because Garcia was sentenced to imprisonment for ten years for a state jail felony, his sentence was illegal. See id. at 340. On appeal, Garcia asserted that his illegal sentence rendered both his underlying judgment of conviction and his probation revocation void. Id. Thus, Garcia was collaterally attacking his underlying conviction for possession of a controlled substance through his direct appeal of his illegal sentence. Id. We noted that generally, “an attack on the original conviction in an appeal from revocation proceedings is a collateral attack and is not allowed.” Id. (quoting Wright, 506 S.W.3d at 481); see also Manuel v. State, 994 S.W.2d 658, 661–62 (Tex. Crim. App. 1999). “However, a criminal defendant can collaterally attack his original conviction in an appeal from the revocation of community supervision under the ‘void judgment’ exception.” Garcia, 549 S.W.3d at 340; see Wright, 506 S.W.3d at 481. Using Wright and Parrott to guide our analysis, we concluded that Garcia’s illegal sentence rendered both the original judgment convicting Appellant of the third-degree felony offense of possession of a controlled substance in a drug-free zone and the judgment revoking his community supervision void because (1) Garcia’s prior criminal history could not cure the illegality of his sentence; and (2) “the only drug-free zone mentioned was Howard Payne University . . . an institution of higher learning.”[2] Garcia, 549 S.W.3d at 342–43. Garcia asked this court to withdraw his plea of guilty, which was made pursuant to a plea bargain agreement. Id. at 344–45. We noted as follows: Whether we allow [Garcia] to withdraw his plea depends on the existence of a plea bargain. When a plea-bargain agreement calls for a sentence much greater than that authorized by law, the proper remedy is to allow the defendant to withdraw his plea because there is no way of knowing whether the State would have offered a plea bargain within the proper range of punishment that he deemed acceptable, or whether he would have decided to proceed to trial. In this situation, resentencing is an insufficient remedy because by attacking the sentence he received and for which he bargained, the applicant is attacking the entire judgment of conviction. Id.(cleaned up) (quoting Rich, 194 S.W.3d at 514–15) (internal citations, alterations, and quotations omitted). The plea agreement in Garcia of confinement of ten years in the event community supervision was unsuccessful was unenforceable because the charged offense was improperly enhanced. Id. Accordingly, we vacated both the trial court’s judgment revoking Garcia’s community supervision and the original judgment of conviction and allowed Garcia to withdraw his plea in order to return the parties to their original position before they entered into a plea bargain agreement. Id. Here, as in Garcia, the parties and the trial court were all mistaken as to the nature of the actual charges with which the defendants in each case were charged and convicted. Additionally, both cases arise from plea bargain agreements, which are impossible in some respect to perform because the sentences were illegal. However, there are two differences between the circumstances in this case and the facts in Garcia. One difference is that Garcia involved regular community supervision while this case arises from deferred adjudication community supervision. The other difference is that Garcia wanted to set aside the order placing him on community supervision while Appellant does not want to set aside the order placing him on deferred adjudication. We conclude that these differences do not render the result in Garcia inapplicable to this case. At the time that it was imposed, the order deferring the adjudication of Appellant’s guilt did not constitute an illegal sentence per se because it placed Appellant on deferred adjudication for a period of six years. See CRIM. PROC. art. 42A.103 (West 2018). In this regard, Appellant acknowledges in his brief that the trial court’s order of deferred adjudication was permitted under the law, since it could have ordered up to ten years of deferred adjudication community supervision for a state jail felony.[3] See id. However, the order deferring the adjudication of Appellant’s guilt contained an error because it provided that Appellant was placed on deferred adjudication community supervision for a third-degree felony such that if he violated the terms and conditions he could be revoked and sentenced to the punishment for a third-degree felony. When the State sought to revoke Appellant’s community supervision, the order revoking his community supervision sentenced him to a period of confinement of six years in accordance with the order deferring Appellant’s adjudication of guilt. But this was an illegal sentence because it was a period that is in excess of the punishment range of a state jail felony. As such, there is no functional difference between the situation in Garcia and the circumstances in this case. Just as the illegal sentence in Garcia rendered the original judgment convicting Garcia of a third-degree felony void, the illegal sentence in this case emanated from the erroneous order deferring an adjudication of Appellant’s guilt thereby rendering it void. The fact that Appellant does not seek to set aside the original order placing him on deferred adjudication as was the case in Garcia is of no consequence. “At its core, a plea bargain is a contract between the state and the defendant.” Moore v. State, 295 S.W.3d 329, 331 (Tex. Crim. App. 2009). The plea bargain in this case was that Appellant would plead guilty to a third-degree felony and receive deferred adjudication for a third-degree felony in exchange for the State’s agreement to dismiss two other pending charges against Appellant. As such, the State made a concession on the two charges that it dismissed in exchange for what appeared to be an agreement that Appellant would be punished for a third-degree felony if he was unsuccessful in completing deferred adjudication community supervision. But that aspect of the plea agreement is unenforceable because Appellant was only charged with a state jail felony. Just like a defendant, the State has a right to be put back into its original position before it entered into a plea agreement. See Rich, 194 S.W.3d at 515; see also Ex Parte Cox, 482 S.W.3d 112, 118 (Tex. Crim. App. 2016) (“Returning the parties to their original positions means a return to the positions that the parties held before the plea agreement was made and therefore does not bind the state to its previous agreement.”) (citing Rich, 194 S.W.3d at 514–15). As noted by the Court of Criminal Appeals in Shannon v. State: When a defendant attacks the sentence he received, and for which he bargained, he is attacking the entire judgment of conviction. To permit resentencing in this situation is to bind only one party to the agreement. This is neither logical nor fair. . . . . Since the appellant sought relief from the agreement, we see no reason why the State should be bound to its recommendation of reduction of the charge to a misdemeanor. . . . . We hold, therefore, that when a defendant, who has entered a negotiated plea of guilty, challenges the conviction and is successful, the appropriate remedy is specific performance of the plea, if possible, or, if not, withdrawal of the plea, with both parties, including the State, returned to their original positions. 708 S.W.2d 850, 852 (Tex. Crim. App. 1986) (emphasis in original) (footnote omitted).[4] Because specific performance of the plea bargain that Appellant made with the State is not possible, the appropriate remedy is to vacate both the trial court’s judgment placing Appellant on deferred adjudication and the judgment adjudicating Appellant’s guilt and return the parties to their original position before they entered into a plea bargain agreement. See Garcia, 549 S.W.3d at 345. We sustain Appellant’s sole issue on appeal in part. We overrule Appellant’s sole issue to the extent that Appellant only seeks a remand for a new adjudication and punishment hearing. This Court’s Ruling We vacate the trial court’s original Order of Deferred Adjudication as well as the trial court’s subsequent Judgment Adjudicating Guilt, and we remand the cause to the trial court for further proceedings consistent with this opinion. JOHN M. BAILEY CHIEF JUSTICE August 30, 2024 Publish. See TEX.R.APP.P. 47.2(b). Panel consists of: Bailey, C.J., Trotter, J., and Williams, J.