I think you're going to find it very difficult to switch. There's nothing blocking you from doing so -- you're allowed to change programs on a J visa, so all you'd need to do is contact programs, find an opening, get accepted, and switch programs. But openings in good programs aren't common, and I tend to fill my openings with prelims from my own or other good programs that come with good reviews. I'm very unlikely to take someone from a community program that I am not affiliated with, or know something about.
Also note that transferring programs at the PGY-2 stage is possible, but is often a challenge for you. You need to learn the new system without having the benefit of being an intern there, yet fill the PGY-2 role and supervise interns. Many of my transfers have had difficulty with that -- and that makes it more difficult to get the good LOR's you need for a GI spot.
Another path forward for you is to finish your program, then get a hospitalist position on a J waiver at a university program. There's some chance that will be a nocturnist position. Then, with the "free time" you have from that position, you volunteer and do GI research with the GI fellowship program. After your waiver is complete (2 years), you now apply to GI programs with your university hospital medicine experience + GI research + LOR from GI. If that doesn't work, then you have a career in HM, or choose a different fellowship.