It is easy to be misled by the name light-year into thinking it measures time, since it contains the word year. But the name actually describes how the unit is built, not what it measures.
Light moves extremely fast, at about \(3 \times 10^8\) metres per second, and in a single year it covers an enormous distance. Astronomers took that fixed distance, the path length light covers in exactly one year, and gave it a name, one light-year.
So the year part only tells you how the distance was calculated, using light's speed over a duration of one year, but the final result is expressed in kilometres or metres, a measure of length. This is similar to saying a two hour drive to mean a distance covered in two hours at a certain speed, not the duration itself.
Therefore, a light-year measures distance, specifically about \(9.46 \times 10^{15}\) metres or roughly 9.46 trillion kilometres.