Dear @Garry,
Nice to hear from you again.
Am I understanding you correctly - you applied for a residence permit based on having a child with a German citizen and you both have custody of the child? Have you applied for asylum?
As an asylum seeker in Germany, you generally have the right to marry. Here is a link from the Wefugees Blog on How to Marry in Germany: follow this link.
You can find the English version when you scroll down. It explains all the necessary steps and documents you will need to get married. Please note that the passport is the first necessary document you have to have in order to get married.
This thread explains this case very well:Is there any way to get married without giving my passport?
Here's another thread where a similar question has been answered before: I'd like to learn more about the marriage procedure in Germany as a refugee
I hope these sources help to answer your question. Let us know if you need any further assistance!
All the best,
Isa