Modified least-squares finite element method for solving the Boltzmann transport equation with spherical harmonic angular approximation