My question involves paternity law for the State of: Missouri

I am living in St Louis, Missouri and I need some help in filing for divorce. The nature of my case is as follows:
We had a child who was born before we got married.
We got married thinking that the child was mine.
We did a paternity test after the wedding and verify that I am not the father.
My name is on the birth certificate.

I need to file a motion to get that resolve, so that I can be alleviated from having to be legally responsible for the child and paying any child support.

I was advised by the court that I need a lawyer to file the “Dissolution of Marriage” to aid me getting off these responsibilities in Missouri.