It shouldn't be too bad. Many places sell a rear hub motor kit that will come with the motor, controller, and battery. Your main problems/decisions are going to be:
1. Replace the whole rear wheel or lace your current rim to the new motor?
2. Does the new controller fit where the old controller is and how accessible is it?
3. How do you connect the battery to the bike?