This problem also shows up in the corersponding independence proof in Statistical inference by Casella and Berger (that's how I got here). Some extra confusion is added by the fact that the book at one point claims that the determinant is $1/n$, but the authors use the determinant $n$ at another point in the proof...
Since the transformation is from $X_1, ..., X_n$, the Jacobian should have elements $\frac{\partial x_i}{\partial y_i}$, and not the other way around (which is the way it is written in the question).
First we need to express $X_1, ..., X_n$ in terms of $Y_1, ..., Y_n$
$Y_1 = \bar{X} = \frac{1}{n}(X_1+...+X_2) \\
Y_2 = X_2 -\bar{X} = X_2 - Y_1\\
...\\
Y_n = X_n - Y_1$
Clearly, $X_i = Y_1 + Y_n$ for $i \in (2, n)$, which gives us
$X_n = Y_1 + Y_n \\
X_{n-1} = Y_1 + Y_{n-1}\\
...\\
X_1 =Y_1-\sum_{i=2}^n Y_i$
and thus the Jacobian will be an identity matrix with a leading column of ones and leading row of negative ones added.
For clarity, this is how it would look for $n=5$
$
J=
\begin{bmatrix}
1 & -1 & -1 & -1 & -1 \\
1 & 1 & 0 & 0 & 0 \\
1 & 0 & 1 & 0 & 0 \\
1 & 0 & 0 & 1 & 0 \\
1 & 0 & 0 & 0 & 1 \\
\end{bmatrix}.
$
To find the determinant of this Jacobian, we use two properties of the determinant. First, we can add any column or row to any other column or row without changing the value of the determinant. If we add each colum to the first, we end up with a matrix which consists of an identity matrix with the top row replaced by a row on the form $(n, -1, ..., -1)$, or in the $n=5$ case
$
J=
\begin{bmatrix}
5 & -1 & -1 & -1 & -1 \\
0 & 1 & 0 & 0 & 0 \\
0 & 0 & 1 & 0 & 0 \\
0 & 0 & 0 & 1 & 0 \\
0 & 0 & 0 & 0 & 1 \\
\end{bmatrix}.
$
Now, if we use Lapalace's formula to expand along the first column we get
$\lvert J \rvert = n * \lvert I_{n-1} \rvert - 0 * \lvert . \rvert + ... - 0 * \lvert . \rvert$
where I have only written out the first minor (which is an identity matrix), since all the other ones will be multiplied by zero and disappear anyway.
Second, we use the result that the determinant of an identity matrix is always one, to obtain
$\lvert J \rvert = n.$