I think this statement is leaning (at least partially) on the translational and rotational symmetry of space. Due to those symmetries the potential V of one body due to the presence of the other body, depends only on their relative position so it is ##V(r)## where ##r=|r1-r2|##. The force is the gradient of V, ##\vec{F}=-\nabla V##.
What it means is that whether we consider gravitational forces or electrostatic forces (between electrically charged bodies), or magnetostatic forces (between magnetized bodies), or electromagnetic forces (for example the Lorenz force and the Laplace force), or nuclear forces (for example between quarks and gluons), all of these types of forces have something in common, that they can only depend on the relative position of the bodies and their relative velocities.