Lagrange equation for the pendulum This is Wilberforce Pendulum that has spring & weight:
https://faraday.physics.utoronto.ca/IYearLab/WilberforceRefBerg2of8.pdf
Wilberforce pendulum is a system of a spring hanging vertically, and a weight
with moment of inertia is hanging.
The system keeps transferring vibration between the spring's vibration and the tortion.
The paper solves with the Lagrange Equation.
However, the Lagrange equation in the paper does not contain the term $mgz$.
Why didn't this take the "gravitational potential energy" into account?
 A: The Lagrangian in question contains the potential energy,
$$U(\theta, z) = \frac12 k~ z^2 + \frac12 \delta~ \theta^2 + \frac12 \epsilon~z~\theta.$$
If we simultaneously add offsets $z = \bar z + \alpha, \theta = \bar \theta + \beta$ and absorb any constant terms into the arbitrary choice of zero for the energy, this becomes
$$\begin{align}
U(\theta, z) &= \frac12 k~ \bar z^2 +  k \alpha \bar z  \\
&~+ \frac12 \delta~ \bar \theta^2 + \delta\beta~\bar\theta \\
&~+\frac12 \epsilon~\bar z~\bar \theta + \frac12 \epsilon \beta ~\bar z + \frac12 \epsilon \alpha ~\bar \theta.
\end{align}
$$In particular choosing to solve the linear system of equations $$
\frac12 \epsilon\beta + k\alpha = mg,\\
\frac12 \epsilon\alpha + \delta\beta = 0,
$$
yields a potential energy which looks entirely like the above Lagrangian but adding a term $m g \bar z.$ Therefore I would just say that probably they are letting the pendulum come perfectly to equilibrium and measuring $z,\theta$ as displacements from that equilibrium; the term $m g z$ was “folded into” the quadratic potentials and did not have to be specially treated.
