followed with ‘I wasn’t aware is so important to you. I didn’t want to insult you and if you felt so, I apologize. The word fuck is one I use very often, but I’ll try to control myself around you’
Note I didn’t insult the coworker (no fuck you or fuck off), but simply said ‘fuck’ out loud due to a job error.
“I’ll try not to swear around you. I’m sorry. I will probably not be perfect, but I assure you I’m trying.”
That’s enough.
I assume you are genuinely sorry and have decided you want to behave differently around them.