The distance
primitive only requires one argument, yes, but it is a "patch or turtle primitive": it must be run in the context of a particular agent by "asking" it for its distance to another, so you can think of the context in which it run as another argument.
If you want to know the distance between patch 0 0
and patch 1 1
, you can write:
ask patch 0 0 [ show distance patch 1 1 ]
or, likely more useful:
[ distance patch 1 1 ] of patch 0 0