Dear @MariaPa,
Welcome to the Wefugees Community and thank you for reaching out to us.
As far as I know, you do not need to marry your partner in order to be assigned to Berlin. I just double-checked and read on "Berlin hilft" that also people with life partners (non-married) could stay together. In this case you need to register at the so-called LAF and declare that you have a partner in Berlin and you want to stay with him. It would be easier though (and more straightforward) if your partner fills a form confirming that you can stay at his place for a minimum period of 6 months and submit it to the immigration office (LEA). Here you can find more information (also in Ukrainian) and the respective form.
I hope this helps and please don't hesitate to get back to us with any further questions.
All the best,
Meike