Ok, first you must create the garage. Then you create the vehicle on the dock of the garage. Keep in mind that both units could move a few tiles if you try to create them on impassable terrain. This is probably a bigger issue for the garage, as trying to place a unit on top of the garage usually just moves the vehicle onto the dock. Then call vehicle.PutInGarage, giving it a coordinate of a tile belonging to the garage, *excluding the dock*. The dock is not considered part of the garage. It must be one of the impassable garage tiles.
As far as I can tell, any impassable garage tile will work. Using the coordinates of the dock will cause the game to crash. If the unit is not on the dock, then it won't be placed in the garage (but the game won't crash either, as long as the garage coordinate is a valid non-dock tile).
Checking e01.dll, I noticed the game offsets the x-coordinate by 1 when placing the unit in the garage from the coordinates used when creating the garage. Just keep in mind that the dock tile moves between Eden and Plymouth. It might be wise to choose the coordinate offset such that it is valid for either colony type, just in case you want to change the colony type at some point in development. (Perhaps for testing, or perhaps for a spinoff level).