I'm gonna throw some numbers at you letting you know this takes a lot of materials. 500 blocks = 500 m. To be on the safe side you'll need 8 stacks of 64 rails. 16 rails requires 6 iron, so that totals around 3 stacks of iron ingots. You'll also need some powered rails to keep you moving along the track. These are made with gold and redstone instead of iron, and can be powered with a redstone torch.
If you find an abandoned mine shaft, this is perfect. Mine up all the rails on the ground and most of the work is already done.
You can lay your track above or below ground. I like mining a tunnel underground for it so I can also find iron to help make the rails. Start placing your rails. Take note of the coordinate you start on. 500 blocks later in whatever direction you went is where you can stop. Every once in a while, place a powered rail down and power it with a redstone torch. Ride in a minecarft from one side to the other and the achievement should pop.