Length doesn't matter as much as if there is any difference in the ground voltage at each end. Assuming typical single-ended connection, there's one signal wire and one ground wire. If there is even a few mV difference in ground between the two ends, then that will cause errors in the measurement. Now, you can also use pseudo-differential, where the sending end is about the same. But, add one more ground wire. A ground to ground between each unit, and then a differential amp computing the difference between the signal wire and the ground wire that is floating at the receive end.
Or, you can go full differential, where the sending unit sends a positive and negative value on two wires.
Jon