An ACME lead screw with a lead nut, and perhaps two guide rails with linear bearings, would solve this just fine. It would be highly accurate (if driven by a stepper motor) but not very fast.
A faster way is to use the two guide rails, and use a winch of some sort, with a controlled motor to run the winch, and perhaps limit switches for detecting each end stop.