Appeal from an order of the Supreme Court (Doran, J.), entered January 5, 1989 in Albany County, which granted defendants’ motion to dismiss the complaint for, inter alia, failure to state a cause of action.
Members of defendant New York State Teachers’ Retirement System (hereinafter the System) prior to July 1, 1973 who were full-time teachers and residents of New York upon entry into and discharge from World War II military service could, pursuant to Education Law § 503 (10), purchase up to three years of credit toward their retirement for their military service. Application had to be made before April 15, 1977 (Education Law § 503 [10] [f]). The residence requirement was perceived as constitutional under August v Bronstein (369 F Supp 190, affd 417 US 901), which upheld a comparable residency requirement in Civil Service Law § 85, so plaintiffs, who satisfied all conditions except the residency requirement, failed to apply for the credit or to challenge the residency requirement during the appropriate time.
After the United States Supreme Court specifically overruled August v Bronstein (supra) in striking down as unconstitutional the comparable residency requirement in Civil Service Law § 85 (Attorney-General of N. Y. v Soto-Lopez, 476 US 898, 912, n 9), plaintiffs commenced this action for a judgment declaring that the residency requirement of Education Law § 503 (10) is unconstitutional and an order allowing them to purchase the credit. Defendants moved to dismiss the complaint on the grounds of failure to state a cause of action, the bar of the Statute of Limitations and laches. Supreme Court granted the motion, concluding that the action was more properly brought as a CPLR article 78 proceeding which was barred by the applicable four-month Statute of Limitations, as well as by laches due to plaintiffs’ unreasonably delayed demand on defendants. From the order dismissing plaintiffs’ complaint, this appeal ensued.
Since it is well settled that a declaratory judgment action is *828the proper procedural vehicle to challenge the constitutionality of a statute (see, Press v County of Monroe, 50 NY2d 695, 702), Supreme Court incorrectly characterized plaintiffs’ allegations as a CPLR article 78 proceeding. Nonetheless, we affirm the dismissal of plaintiffs’ complaint. Even if we were to declare the residency requirement of Education Law § 503 (10) unconstitutional, plaintiffs would have no right to the credit sought because they never applied for it within the statutorily permitted time period. As a result, plaintiffs have not been personally injured by the challenged statute and, therefore, lack standing to complain about any alleged deficiencies in the law (see, Matter of Eaton Assocs. v Egan, 142 AD2d 330, 334). Since standing is jurisdictional and goes to a court’s authority to resolve litigation, we can raise this matter sua sponte (supra, at 334-335). In the absence of standing, plaintiffs’ complaint was properly dismissed.
Plaintiffs attempt to excuse their failure to apply within the appropriate time by claiming that such application would have been futile since the residency requirement was then considered constitutional under Bronstein (supra). Such application would not have been futile if coupled with a challenge to the constitutionality of the residency requirement. Indeed, the plaintiffs in Attorney-General of N. Y. v Soto-Lopez (supra) did not believe such action was futile (see also, Fiesel v Board of Educ., 675 F2d 522). Accordingly, we are not persuaded by plaintiffs’ proffered excuse of futility.
Moreover, a declaration of invalidity would not help plaintiffs’ cause. The facts that Soto-Lopez (supra) overruled a clear precedent, that plaintiffs failed to apply for benefits or challenge the residency requirement within the statutorily prescribed April 15, 1977 deadline and that plaintiffs failed even to commence this action for some two years after Soto-Lopez was decided by the United States Supreme Court are factors militating against retroactive application of the declaration sought by plaintiffs (see, e.g., Chevron Oil Co. v Huson, 404 US 97, 106-107; Gurnee v Aetna Life & Cas. Co., 55 NY2d 184, 192, cert denied 459 US 837). For all these reasons, we affirm the order of dismissal.
Order affirmed, without costs. Mahoney, P. J., Casey, Yesawich, Jr., Levine and Harvey, JJ., concur.