For the traveller it’s not the same distance; due to length contraction it’s a smaller distance, and so takes less time. For the observer who sees the distance as a full light year it appears to take more than a year, but the traveller’s clocks appear slowed down and so will advance by less than that. (The time experienced by the traveller will still be more than a year unless the travel speed exceeds , ie just over 70% of the speed of light.)