In simple words, if the vehicle travels at the speed of light, then it will take exactly the same amount of time to reach the light from the earth in that galaxy. Now it will depend on how many light years away that galaxy is from Earth. If it is 1000 light years away then it will take 1000 years. However, an interesting fact is that if there are any people in that spacecraft, then it will not take so much time for those people at all. He would think that he had only spent a few minutes. And it will only be possible if it can only travel at the speed of light. And it is impossible to walk at the speed of light.