Photons/light are massless and do not experience time or distance. Like if you see a flash of lightning, it happens so fast (from your point of reference) it seems instant. But, for you as a reference point, it did take some tiny fraction of time. You can watch a vid of it in slo-mo and slow it down further. The lighting strike has a place and a timeframe - depending on the point of reference, in this case, you. At light speed, that all breaks down, because you can't have an observer travelling at light speed, hence no point of reference within the 'frame' of lightspeed itself. For the photon, there is no reference point other than everything else, and no coordinates of time or distance, from its perspective, if it had one. If you're asking how long does it take to get from here to there, that only has any relevance in terms of the observer, so your question needs to start from there. Who is observing, from where. If the answer doesn't make sense it doesn't have anything to do with the photons, the time and distance are only relevant for the observer, by and for whom the parameters are set. For the photon, none of that has any relevance. If you could track a proton over billions of years time and billions of light years distance, that time would only pass for you, and the distance would only have any relevance as extending out from your POV. For the photon there would be no elapsed time to measure distance by.