The idea of time dilation depends very strongly on who’s doing the observing. The general idea is that the faster you go, the more your clocks appear to move slowly from the perspective of someone not moving at that speed. However, from the perspective of the person moving quickly, your clock is fine; relatively speaking, it’s the people not moving who have odd clocks.
We can observe this happening at small-ish velocities with the clocks on the International Space Station. I say small-ish because they’re not going that fast (nowhere near the speed of light), but they are still orbiting just fast enough to make it into minuscule time dilation territory - the clocks on the space station are fast by a few milliseconds, relative to the control team on the ground. If you spent a year on the ISS (which is rare, most people only spend a few months up there), you would have aged a grand total of 0.007 seconds less than your family on the ground. This is a very small number because the ISS is orbiting at around 7.7 km/s, and the speed of light is about 39,000 times faster than that.
Now, if we put an imaginary person on a much faster ship and have them observe time passing, the difference between their time and the time at home on Earth will increase. This difference in the time both people have observed to have passed is called the Lorentz factor. The Lorentz factor is named after Hendrik Lorentz, who wrote down some of the equations helping to relate differences in length and in time perceived by two observers of the universe. This factor is also what’s plotted on the vertical axis of the figure above.
This factor increases like an exponential as you start moving faster and faster (it’s not actually an exponential, but it’s close in shape). Importantly, the closer you get to the actual speed of light, the more dramatic the discrepancy between the traveller and the Earthbound becomes. This tells you that the closer to the speed of light you move, the longer and longer your Earthbound observers will wait for one of your seconds to pass.
But what happens if we attach an imaginary observer to a photon of light, or to a hypothetical speed-of-light ship? At the speed of light, time dilation gets a little weird(er). The exact relation magnitude of the difference between the fast traveller and someone back home on Earth is determined by the ratio of one over the square root of the following:
(1 - (velocity squared/ speed of light squared))
If the velocity is equal to the speed of light (as it would be, for our imaginary photon hitchhiker), then that second ratio is equal to 1. Now subtract 1 from 1, and you get zero. The square root of 0 is still zero, and then we run into a problem, mathematically. Now we have to divide 1/0, but any number divided by 0 is infinity. This is why the Lorentz factor suddenly shoots off the top of the figure when you reach the speed of light.
According to our current understanding of this physics, a person on Earth would therefore have to wait an infinite amount of time to observe any amount of time passing on the photon. As far as the Earthbound observer is concerned, time has stopped for the photon-rider.
The trick to answering your question is that there isn’t really an “in reality” here. We would observe the photons to not feel the passage of time, but the photon wouldn’t notice anything different about the way its own time is passing. We observe photons to have finite speed - and that’s a real measurement of the physics of the universe, and our determinations of light years are still good, impartial, measuring sticks for the universe. It’s just that the photon (as we see it) won’t feel those 100 years passing.