How do I calibrate an ESC after connecting it to an Arduino?
The is a standard with RC connectors, that is Black always goes to ground white/orange goes to the signal and red/brown goes to 5V. 

I don't know if you have made a typo, but you need to connect the white to D9 and the black to GND. Here is a instructables post, it describes using a brushed ESC step two reiterates the colour code standard.

You would also need a rotary encoder or shaft encoder to tell the distance moved, there are lots of ways to achieve this from simple(coded disk and IR arrangement) to custom made PCB add-ons.