New Horizons has been designed for a lifetime of 20-25 years. New Horizons is powered by an RTG. Over time, this will lose power as the plutonium decays. Around 2030 (PDF on New Horizons design), the RTG will no longer supply sufficient power to cover the spacecraft's needs even in its lowest-power cruise mode. For probes to the outer solar system, the power supply will be the limiting factor. You can design the power supply to last longer, you just have to add more plutonium to the RTG.
For probes that operate in the inner solar system where they can use solar panels, things get a bit easier. Solar panels degrade too, but not as quickly as an RTG. ISEE shows it's possible to keep a spacecraft running without batteries - but you'll have to plan the spacecraft's orbit to keep it out of shadow. A spacecraft that goes in and out of the shadow of a planet is subject to a deep thermal cycle, which tends to break things.
In general, spacecraft are subject to the slow destructive force of entropy. Systems will fail eventually. This related question gives a detailed overview of the problems you encounter when designing a system for a very long lifetime. There comes a point where it's more cost-effective to launch a new satellite than to keep the old one operational. Advances in science also mean you'll eventually want to launch new, state-of-the-art instruments instead of having to make do with 100-year-old technology.