Concept:
A homogeneous system of linear equations has a non-trivial solution if and only if the determinant of its coefficient matrix is zero.
That is, for
\[
AX=0,
\]
a non-trivial solution exists when
\[
|A|=0.
\]
Step 1: Form the coefficient matrix and equate its determinant to zero.
The coefficient matrix is
\[
A=
\begin{bmatrix}
1 & 3 & 7
-1 & 4 & 7
\sin 3\theta & \cos 2\theta & 2
\end{bmatrix}.
\]
For a non-trivial solution,
\[
\begin{vmatrix}
1 & 3 & 7
-1 & 4 & 7
\sin 3\theta & \cos 2\theta & 2
\end{vmatrix}=0.
\]
Expanding along the first row,
\[
1
\begin{vmatrix}
4 & 7
\cos 2\theta & 2
\end{vmatrix}
-3
\begin{vmatrix}
-1 & 7
\sin 3\theta & 2
\end{vmatrix}
+7
\begin{vmatrix}
-1 & 4
\sin 3\theta & \cos 2\theta
\end{vmatrix}
=0.
\]
Step 2: Evaluate the determinant.
\[
(8-7\cos 2\theta)
-3(-2-7\sin 3\theta)
+7(-\cos 2\theta-4\sin 3\theta)
=0.
\]
\[
8-7\cos 2\theta
+6+21\sin 3\theta
-7\cos 2\theta
-28\sin 3\theta
=0.
\]
\[
14-14\cos 2\theta-7\sin 3\theta=0.
\]
Dividing by \(7\),
\[
2-2\cos 2\theta-\sin 3\theta=0.
\]
Using
\[
1-\cos 2\theta=2\sin^2\theta,
\]
we get
\[
4\sin^2\theta-\sin 3\theta=0.
\]
\[
\sin 3\theta=4\sin^2\theta.
\]
Step 3: Solve the trigonometric equation.
Using
\[
\sin 3\theta
=
3\sin\theta-4\sin^3\theta,
\]
we obtain
\[
3\sin\theta-4\sin^3\theta
=
4\sin^2\theta.
\]
\[
\sin\theta
\left(
3-4\sin^2\theta-4\sin\theta
\right)=0.
\]
Since
\[
\theta\in(0,\pi),
\]
\[
\sin\theta\neq 0.
\]
Therefore,
\[
3-4\sin^2\theta-4\sin\theta=0.
\]
\[
4\sin^2\theta+4\sin\theta-3=0.
\]
Let
\[
s=\sin\theta.
\]
Then
\[
4s^2+4s-3=0.
\]
\[
(2s-1)(2s+3)=0.
\]
\[
s=\frac12
\]
or
\[
s=-\frac32.
\]
Since \( \sin\theta \in [-1,1] \),
\[
\sin\theta=\frac12.
\]
Step 4: Find the values of \( \theta \).
For
\[
\sin\theta=\frac12,
\]
and
\[
\theta\in(0,\pi),
\]
the solutions are
\[
\theta_1=\frac{\pi}{6},
\qquad
\theta_2=\frac{5\pi}{6}.
\]
Hence,
\[
|\theta_1-\theta_2|
=
\left|
\frac{\pi}{6}
-\frac{5\pi}{6}
\right|
=
\frac{4\pi}{6}
=
\frac{2\pi}{3}.
\]
Step 5: Write the final answer.
\[
\boxed{\frac{2\pi}{3}}
\]