Zoom lenses have a moving group of lenses within the whole unit. It seems to me that any lens could easily be made into a zoom lens by moving the whole lens unit towards/away from the film/sensor.
Why don't we just do this?
Moving all of the glass elements away from the imaging area is what extension tubes do, and you will note that they do not increase the lens' focal length. An extension tube just moves the focusing points, which allows the lens to focus closer, at the cost of loss of infinity focus plus some light loss. That puts paid to your idea right there: it doesn't do what you want, and even if it did, there are unwanted consequences to doing it, so that's reason enough not to do it.
You can fix some of this by adding more optical elements, at which point you have essentially reinvented the teleconverter. You still lose light when doing this, but you have at least achieved the desired end of "zooming" by extending the length of the optical system.
Why don't we just do this?
For that matter, why not just have a single lens element? You can always find a lens that provides a given level of magnification, right?
Lenses have multiple elements largely to correct various kinds of aberration, and they're designed to project the image at a fixed distance. Simply moving the entire unit farther from or closer to the sensor probably wouldn't give the same performance -- you might lose sharpness, get increased chromatic aberration, etc. Also, you'd surely lose focus as you zoom, whereas many lenses keep focus or at least nearly keep focus as you zoom.
The camera lens acts like a projector lens in that it projects an image of the outside world on the surface of film or digital image sensor. The lens design causes light rays to alter their path. As they transit the lens they are caused to bend inward. In other words, the light rays exit the lens and converge. A ray trace reveals that they trace out the shape of a cone of light. A measurement of distance apex to lens reveals the focal length. This measurement is taken when the lens is imaging an object at infinity (as far as the eye can see). The amount of inward bending of the light rays is a function of the shape of the lens (its figure), and the density of the lens material (index of refraction).
The distance measurement from the apex of the converging rays to the lens is a variable. This distance will be the shortest when the lens is imaging an object at infinity. For a 50mm focal length lens, this distance is 50mm. Should this same lens image an object closer than infinity, this distance, now called the back focus, is elongated. At unity (life-size or 1:1 magnification), the back focus will be 100mm. In other words, when we focus on objects at distances closer than infinity, the entire lens array must be repositioned forward to accommodate the now elongated back focus distance. We focus by racking the lens forward or backwards so that the apex of the converging light rays just kiss-off on the surface of film or digital image sensor.
Serious Photographers likely carry about with their cameras and a gadget bag jam-packed with lenses of different focal lengths. This arsenal of lenses is the tools of our trade. With the advent of the modern zoom lens with its adjustable focal length, the number of lenses in the gadget bag has been greatly reduced.
Making a good zoom lens is a formidable task. Only in recent years have we mitigated the extra aberrations and distortions that a zoom lens induces. I think you should also know that as you zoom, profound image brightness changes are also induced. Modern optics has conquered most of the problems. The goal is to make a faithful image. A few years ago this just a dream; we all look forward to still greater improvements.
The zoom works by causing the position of the individual lens elements to move in relation to each other. All the while, the back focus distance must remain a constant, so sharp focus is maintained throughout the zoom. As to image brightness, some expensive zooms keep a constant aperture throughout the zoom, though most fail at the upper magnifications. This is OK because the modern camera body reads the exposure though the lens thus good exposure is maintained.
We move the lens forward and backwards to focus on different object distances. We reposition the lens elements inside the barrel to gain the needed variation in the focal length.
The primary problem with what you suggest is that as you move the lens away from the film/sensor you move the point of focus closer and closer to the front of the lens. Eventually the front of the lens and the point of focus meet and you can't go any further.
With a single thin lens the only distance at which collimated light may be focused on the film/sensor plane is when the film/sensor is the lens' focal length behind the lens. This is what we call infinity focus. With compound lenses the focal length may be further from the film/sensor than the physical front of the lens (telephoto) or closer to the film/sensor than the front of the lens (retrofocus). But regardless of where the actual end of the lens is compared to the focal length of the lens if the lens is moved further from the film/sensor than its own focal length then the ability to focus distant objects is lost. The further it is moved the less distant the objects that can be focused will be.
Zoom lenses cope with this by including extra lens elements that alter the overall focal length of the lens as it is zoomed in and out.