I had to do the same when I moved here. I did it by getting the group together (if you hang out in a couple of different circles, you should probably get together with them in that manner), and told them that my parents have decided that we are moving to USA. There were a lot of Qs (“for how long?” “why?” “do you have to go?” “when will you visit?”) and some statements (“wow…that’s far”). After all those were answered, we just hugged and then for the last 3 weeks I was there, we basically hung out all the time. They also taught me how to bike (because while other kids were learning to bike, I was busy playing badminton…i started young)...which yielded some truly memorable experiences haha. And we went on a couple of road trips.
The last week was like a big farewell party, where we made sure we had exchanged contact info (so much easier now that you have sites like FB) and promised to keep in touch. Are we still in touch? 5 years later, and yes, I can proudly say that I talk to them at least once/2 weeks!
IMO, it’s not that hard to tell them, it’s just the feeling sad and worrying you’ll lose contact part that’s hard. Remind them that they now have an excuse to visit you and promise to do so the same whenever you get the opportunity! Good Luck and really enjoy the time you have left, you’ll remember it forever!