It is true, whether or not "linear" means homogeneous-linear taking $0$ to $0$.
Triangle $ABC$, if it is nondegenerate (nonzero area), determines a linear coordinate system in which $A=(0,0)$, $B=(0,1)$ and $C=(1,0)$, and coordinate $(x,y)$ is assigned to the point $A + x(B-A) + y(C-A)$. The distances between pairs of points are fully and uniquely determined by the coordinates of the points and the lengths $AB, BC$ and $CA$. Therefore, the unique invertible affine (linear inhomogeneous) transformation
"for all $(x,y)$, send the point with $ABC$-coordinates $(x,y)$ to the point with $A'B'C'$-coordinates $(x,y)$"
is an isometry if $ABC$ is congruent to $A'B'C'$ and both triangles are non-degenerate. It is also the unique affine-linear transformation sending $ABC$ to $A'B'C'$, so that any linear transformation with that property is an isometry.