$\kappa$ must be an affine isometry. If $\gamma:[0,1]\to\mathbb{R}^n$ is a smooth curve and $L(\gamma)$ denotes its length, then 
$$
L(\kappa\circ\gamma)=\int_0^1|D(\kappa\circ\gamma)(t)|\, dt=
\int_0^1|D\kappa(\gamma(t))\gamma'(t)|\, dt=\int_0^1|\gamma'(t)|\, dt=L(\gamma).
$$
This is because $D\kappa\in O(n)$ and hence this linear map preserves lengths of vectors. The above calculation shows that $\kappa$ preserves lengths of curves from which it easily follows that it preserves distances and hence it is an isometry of $\mathbb{R}^n$. To see that $\kappa$ preserves distamces we argue as follows: If $\gamma$ is a parametrization of a segment connecting $x$ to $y$, then 
$\kappa\circ\gamma$ connects $x$ to $y$ and hence its length is at least $|x-y|$
$$
|\kappa(x)-\kappa(y)|\leq L(\kappa\circ\gamma)=L(\gamma)=|x-y|.
$$
Applying the same argument to the inverse diffeomorphism $\kappa^{-1}$ we have
$$
|x-y|=|\kappa^{-1}(\kappa(x))-\kappa^{-1}(\kappa(y))|\leq |\kappa(x)-\kappa(y)|
$$
and the above two inequalities show that $|x-y|=|\kappa(x)-\kappa(y)|$.