I thought this was a duplicate but it turns out I was remembering an answer from Alison Green over at Ask A Manager. Rather than paraphrase her thoughts, I'll just reproduce them in their entirety since they perfectly match your situation (#1 at the link):
Oooof, this is tricky. Rightly or wrongly, if you proactively apply for an internal promotion, it’s usually pretty much assumed that you want it and will take it if offered, as long as long as you can come to terms on salary and other details; they’ll assume that as an insider you know enough about the culture and the role that you wouldn’t be going after it if you didn’t really want it.
That doesn’t mean that you’re stuck taking this job, but it does mean that you should be prepared to talk about what changed your mind and how you see your future there. It’s possible that it will change the way you’re seen and/or what opportunities you’re offered there in the future, but it’s hard to say that for sure without knowing more about what your reasons are, and why things played out the way they did (i.e., why you didn’t realize you didn’t want the job until now).
TL;DR You don't have to accept, but that kind of flip-flop can damage your reputation and torpedo future chances of internal advancement.
Now specifically for your situation: the one thing you can still try is to go to your current manager and mention what you said here: how you were looking forward to the transfer to get more responsibility/experience/whatever but that you realised that you would likely perform better in the position you are thinking of in your current role. Then discuss if it makes sense for you to apply for that promotion early instead of transferring.
Note: I'm assuming that when you say promotion that you do mean an actual promotion, implying that the transfer is a lateral move. If that is not the case or you're talking about receiving a raise earlier then you can't really make that argument.