This sounds like a bad idea. Not the part about flying alone internationally; lots of kids do that. But going to another country to visit someone you've never met, without a way to support yourself in case of emergency? Yikes.
What if they turn out to be sketchy people? Or they change their mind about hosting you? You need to have a backup plan for getting yourself home. Also for getting yourself from your friend's house to a hotel in case things go wrong. Better yet, tell your girlfriend to come visit you instead!