It is injective because if $g(s)=g(t)$, $s<t$, then you can remove the interval $[s,t]$ from the domain of definition of $g$ and make the curve shorter. Then you rescale the domain to be $[0,1]$. Rescaling does not change the length of the curve.