Let $a$ and $b$ be two points in an euclidean space $\mathbb{R^n}$
Then,I denote by $\Omega(a,b)$ set of all maps $\gamma : [0,1] \to \mathbb{R}^n$ such that $\gamma(0) = a,\gamma(1) = b$ and the integral
$$ L(\gamma) = \int^1_0 \|\dot\gamma(t) \| \; \mathrm{d}t $$
makes sense. To achieve existence of the integral it is possible to demand from paths to be smooth $(\Omega(a,b) \subset C^k)$. But I thin it is possible to pose this question just then paths are only differentiable almost everywhere with respect to Lebesgue measure on $[0,1].$
It is easy exercise to show that for that parametric straight line $$ \lambda(t) = (1 - t)a + t b $$ it holds that: $$ \forall \gamma \in \Omega(a,b) \; . \; L(\gamma) \ge d(a,b) = \| b - a\| = L(\lambda) $$
The problem is to show that the above inequality is strict for $\gamma \not \cong \lambda$ i. e. $L(\gamma) > L(\lambda)$ either for all smooth paths or for a.s. differentiable continuous paths or prove a counterexample.
I think it is appropriate to talk of equivalence classes here formed by relation $$ \alpha \cong \beta \iff \mathrm{Im}\; \alpha = \mathrm{Im} \; \beta$$
(you can probably add almost surely first Hausdorff measure if you want to reason about a. s. differentiable paths) as we want to reason about geometric shapes of curves and about trajectories of particles. Then, it must be possible to select a constant speed curve in each class. That is, a curve $\gamma$ such that $$ \forall t \in [0,1] \; . \; \| \dot \gamma(t) \| = C . $$
Then the problem reduces to showing that if constant-speed curve $\gamma$ has
$ \| \dot \gamma(t) \| = d(a,b) then $\gamma = \lambda$. $
But I don't know how to proceed from here.
In more general terms, a continuous curve $\gamma : [0,1] \to \mathbb{R}^n$ has a finite length if $$\overline{L}(\gamma) = \sup\limits_\sigma \left(L(\sigma) = \sum_{i=1}^{n-1} \Vert \gamma(a_{i+1}) - \gamma(a_i)\Vert\right)$$ is finite where the supremum is taken on all subdivisions $\sigma \colon 0=a_1 < a_2 < \dots < a_{n-1} < a_n=1$ of $[0,1]$.
If $\gamma$ is $\mathcal C^1$, it can be proven that
$$\overline{L}(\gamma) = L(\gamma)=\int^1_0 \|\dot\gamma(t) \| \; \mathrm{d}t.$$
Now it is clear that $$\overline{L}(\gamma) \ge \Vert \gamma(1) - \gamma(0) \Vert$$
according to subbadditivity of the norm $\Vert \cdot \Vert$.
If $\gamma(a)$ with $a \in (0,1)$ is not on the segment $[\gamma(0),\gamma(1)]$, then $$\overline{L}(\gamma) \ge \Vert \gamma(1) - \gamma(a) \Vert + \Vert \gamma(a) - \gamma(0) \Vert > \Vert \gamma(1) - \gamma(0) \Vert$$
concluding the proof that the curve length is strictly greater than the straight line if the curve is not a straight line.