What's the best way to get academic references for a masters program 2-3 years in the future?
I would strongly suggest that you make the connections immediately since you are moving out of the area. Take this time to meet with three or four of the professors in whose classes you did the best or got the most out of.  I would see if you can get some face to face time so that they can put a name to a face.  You might be surprised that they actually do remember you! And then explain to them your dilemma and ask them what you asked here... Would they be comfortable giving you a reference?  I've found in my experience that most people want to help when they can... they just need to be asked. Good luck!