How to use Mozilla Location Service as network location provider?
The MLS wiki has a list of community-provided Android software that utilizes MLS. There, you find a link to Ichnaea NLP Backend.

And that is exactly the piece of software you are looking for. Because it is an implementation of Unified NLP, the de-facto standard of non-Google network location provider services employed in Custom ROMs. See its README for installation of Unified NLP and a backend, in your case Ichnaea NLP.