Distance measurement

Everything you need to know can be found in this Application Note:
http://www.acam.de/fileadmin/Download/pdf/TDC/English/AN034_en.pdf

They even include source code in C. It's written for an STM32 microprocessor but much of it should be applicable to the Arduino:
http://www.acam.de/fileadmin/Download/_software/TDC/GP22_main_AN034.c