I would like to determine the distance and travel time between two addresses/coordinates given a particular means of transportation (car, bicycle, …) from a 4D application. As far as I know the Google Distance Matrix API should do the trick, but I don’t know how to integrate it in the 4D environment.

Ask Google to look up at Google-documentation

Paste the example from there
into your Browser-Window. Result is some JSON.

To achieve the same, write some 4D-code like this
$result_L:=HTTP Get($url;$received_T)

Your work then is to understand the URL and optimize the URL for your needs – like exchanging json just before the ? with xml and you’ll receive the same data as xml – and of course you need to parse the received JSON/XML.

If your are on Mac, starting with Mavericks, you could code like this
and learn here how it’s supposed to work.