This is only a partial explanation.
The calculus for distance is something different. The path is a curved line in a 4D space. At a faster Lorentz speed, the spaceship will travel on another curved trajectory than for a slower speed. This new path will be shorter than the first one. Fr faster speeds will be shorter paths than for lower speeds but these paths can be represented in a 4D space.
A 3D example. You can imagine an airplane traveling between two cities on Earth ( Los Angeles and Tokyo) At slower speeds will travel near the Equator on a longer path than at a faster speed. At faster speeds the airplane will travel near the North Pole where the route is curved also, but shorter than the first one. Of course, on Earth, the airplane will travel on the shortest routes, no matter its speed. This example is to image curved paths.
(copied from someone on Quora)
See
https://physics.bu.edu/~duffy/ns547_spring10_notes03/length_contraction.html