The long-term theory of climate patterns states that the Earth experiences an ice age, freezing over and remaining so for about 40 years, before returning to a normal, seasonal climate. My question is: is it possible for an ice age to happen so quickly? Is 40 years too short, or is that perfectly feasible?
This was about the duration of the Maunder Minimum also known as the Little Ice Age. The Sun was known to be unusually quiescent during this time and it is thought the cooling climate was due to this low solar activity.
Yes. Through a supervolcano eruption. Something like the Yellowstone blowing up.
The ashes in the stratosphere, veiling the sky, would bring an equivalent of "nuclear winter". This would normally end sooner than your planned 40 years, but the eruption may be repetitive or continuous, extending the period as long as necessary. Scale this in time as necessary, with size of the volcano and duration of explosion.
Note that this won't form superglaciers like in the real ice age, covering whole continents and forming mountain ranges as they move - you do need a couple hundred thousand years for these to form from repeated snowfalls. It would be a very long, very cold winter with permanently cloudy skies, not a true "ice age".
If you wanted this to happen repetitively, you could postulate stellar system with orbital configurations that provide the necessary climatic changes.
Binary Star System
If you posit a binary star system of two stars smaller than our Sun, your planet would circle one star and the spacing between the stars would roughly be the distance of Neptune from our Sun.
Habitable planet in binary star system
When the outer sun got closer (the left of the image) you'd get warm periods. When the outer sun got further away, it would plunge the planet into an ice age.
You could play with the solar system mechanics to get the length and severity of warm and cool periods that you wanted.
Elliptical Planetary Orbit
You can use a similar method to induce climate changes with just a single star. Put your planet in an elliptical orbit with the correct attributes to induce periods and severity of warmth and cold.
In (astronomer) Fred Hoyle's book The Black Cloud, he states that a sufficiently dense gas and dust cloud could significantly reduce incoming stellar radiation.
You could postulate that your stellar system has passed through a tendril of a star forming nebula and this dust and gas reduces the amount of the star's energy reaching the planet. By this mechanism you could make the duration and timing the ice age completely arbitrary and not subject to repetition. NOTE: that it would take a star a minimum of tens of thousands of years to cross the entire nebula - which is why I suggested just crossing a tendril.
Plus as an SF setting, I imagine the inhabitants of the planet would have astounding sights in the night sky.