My ex started taking my son to a baptist church
Although, I am not the custodial parent. In that situation I have decided to allow my 12 year old son to make his own decision in this area. Particularly, because he really wants to emulate his Dad. I am careful to not try to push him towards unbelief. He, beyond everything else, needs to be his own man!
It depends on what you want the outcome to be.
If you want your son to stop attending church, then you're going to need to confront your ex. State that it's unacceptable, and threaten access if they're unwilling to comply.
If you simply don't want your son to believe in what he's learning in church, then talk to him. Explain your own views on religion. Let him draw his own concluions.
Talk to your kid about religion. Mine developed definite "views" around seven but went along because it was school policy.
We talked about it a lot. Mostly so they could reason out why they thought it was "silly".
Don't outright ban it, talk through the inconsistencies. Your kid ought to have a chance to form his own views, and they will change. Be prepared for a spurt of teenaged spirituality.
Maybe good if you're bringing him up how you want ie learning how to learn and not what to learn, maybe it's a good thing as it could open his eyes to the bullshit.