A light year is a distance, but it is a distance based on time. That is why it is referred to as a light year.
A meter or a mile is not based on time. There is a difference.
I am not saying it is not a distance. I am just saying that time is involved with the term.
What is a meter based on?
meter. The basic unit of length in the metric system; it was originally planned so that the circumference of the Earth would be measured at about forty million meters. A meter is 39.37 inches.
Today, the meter is defined to be the distance light travels in 1 / 299,792,458 seconds.
The mile is an English unit of length of linear measure equal to 5,280 feet, or 1,760 yards, and standardised as exactly 1,609.344 metres
So, in the interests of greater accuracy, the meter
is a distance based on the speed of light. And the mile
is also a distance based on the speed of light. Just as a lightyear
is a distance based on the speed of light.
Astronomers needed some "measurement" to calculate distances to distant objects, miles was way too small. One method they invented was a calculation based on the distance light would travel in the time it takes the earth to make one solar orbit.
We know how fast light travels: 299 792 458 m / s.
We know how many seconds it takes the earth to make on solar orbit: approximately 31,556,736
Multiply one by the other and you get a
distance of about 9.46 trillion km.
Another method they invented is called a parsec.