Transferring within your company
Whether you've been with the company a few months or many years this dialog doesn't change much. You're working position X and think you'd enjoy position Y more. This is always inconvenient for your boss (unless position Y is REALLY hard to fill compared to X)
How does one tackle internal company transfers
This can be a bit of a dance, you want to avoid burning your relationship with your boss, but you also want to pursue the new opportunity. Unlike taking a new job else where this is one you do have to let your boss know about. (because the new "boss" will surely ask your boss about it)
Generally I've approached this as follows. I schedule a private meeting with my boss. In this meeting I cover things in the same manner you have here. "Hey boss, first I wanted to let you know I really like working with you in position Y, however; I noticed there is an opening in position X that really interests me. I'd like to pursue this opportunity if it's okay with you."
Typically this will be followed with a discussion about why you think you'd like that spot more, or if there is something they can do to make your current role more in line with what you'd like, etc.
On the rare occasion you'll run into the crappy boss who just puts their foot down and refuses. If the boss rejects it outright because "they need you" or no reason provided, that's a bad sign generally speaking. (concerns in company health / culture)
If it's the first one you should be able to win your boss over by explaining you'll probably enjoy and be more effective in the new role. If it's flat out rejection then likely your chances of getting the role are slim without burning bridges that could cause all sorts of drama.