Here’s what Professor Hallux has to say:
Don’t worry, you’re not going to turn into a fly! If you swallowed it then it’s probably ended up in your stomach.
It will get digested along with anything else you’ve eaten (hopefully tasty food rather than more flies!) and then whatever’s left will come out the other end when you visit the toilet.
Sometimes though people inhale a fly by accident and it gets into the lungs. The fly will get trapped in a layer of mucus which is designed to protect your lungs and stop things like this happened. But if you think this has happened to you then you should tell your parents.