If $\beta=0$ this is a Bessel ODE and the solution is straightforward.
If $\beta\neq 0$, this kind of second order linear ODE can be reduced to a confluent hypergeometric ODE thanks to a change of function such as :
This is the most arduous and tiresome part of the work.
After this change of function, the new ODE is turned on the form :
in derermining the parameters $a$ and $b$ as functions of $\beta$ and $\gamma$ so that the form of the new ODE fit with the confluent hypergeometric equation :
The solutions, expressed as a linear combination of two confluent hypergeometric functions (or eventualy associated Legendre polynomial) allows to come backward to the solutions $w(t)$ of the initial ODE.
Sorry, since I am about to leave for several days, I have no more available time for more details.