Typically people do this by doing the math between the latitude and longitude. When you do distance between zips typically people use the center lat/lon as the location does to the distance. Given the great tools on the web, you may want to use actual addresses vs. just zips. To get the distance between two lats/lons is just math. Below are two links. One with code and one with the math! Good luck!
Check below examples.
https://hicglobalsolutions.com/blog/find-distance-between-two-zip-codes-using-google-api/
https://salesforce.stackexchange.com/questions/116250/can-somebody-help-me-in-finding-distance-using-zipcodes-and-google-apis
Thanks,
pat
http://www.codewalkers.com/c/a/Miscellaneous-Code/Calculate-Distance-Between-Two-ZIP-Codes/
http://mathforum.org/library/drmath/view/51722.html
Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.
Thanks.