The maths is wrong, though the idea is correct. At 0.5C, the length compression is approximately 86.6%. Basically, the star 1 ly away now appears to only be 0.866 ly away.
From outside, you took 2 years to get there. By your ship’s clocks, you took 1.73 years to get there.
The effect gets stronger as you approach C. At 0.99C, time passes at only 14% the speed it passes for an observer. The distance also shrinks to only 0.14 light years.
The maths is wrong, though the idea is correct. At 0.5C, the length compression is approximately 86.6%. Basically, the star 1 ly away now appears to only be 0.866 ly away.
From outside, you took 2 years to get there. By your ship’s clocks, you took 1.73 years to get there.
The effect gets stronger as you approach C. At 0.99C, time passes at only 14% the speed it passes for an observer. The distance also shrinks to only 0.14 light years.
This calculator lets you play with the numbers. https://www.omnicalculator.com/physics/time-dilation
Time dilation and length contraction are fundamentally linked. The change is the same in both, so that C is always constant, at any speed.