The Supreme Court struck down that statute because it said that the activity that the statute prohibited was not any significant part of interstate commerce. The Commerce Clause says that Congress has the right to regulate comerce "among the several States." Congress had said that that right gave them the power to ban guns in school districts. The Supreme Court said that it did not.
The issue here was how much the Congress can do under the Commerce Clause. Over the years, Congress has passed more and more laws that have regulated activity within states, saying that it could do so because of the Commerce Clause. This has included things like the 1964 Civil Rights Act in which the Congress said it could ban discrimination in places like local restaurants because those were part of interstate commerce.
In 1995, the Supreme Court finally put a limit on such laws. It said that possession of a gun in a school zone was something that was not part of interstate commerce and that only a state could make a law prohibiting it. Therefore, the Court said that Congress had gone too far and that the statute prohibiting carrying guns in a school zone was unconstitutional.