Disc brakes are automatically adjusted as the pads wear. The pistons (which squeeze the pads) sit in the caliper with a seal which is square on section, when you squeeze the brakes the fluid pushes the piston and the seal flexes to allow the piston to move. When you release the pressure on the brakes the seal returns to its original position pulling the piston back and your pads away from the disc. As the pads wear the piston will push in further than the seal can flex and slide along the seal a tiny amount to self adjust. If your pedal needs to be pushed all the way down you may have air in your rear brake fluid. This needs bleeding out and the fluid replacing. My bike was brand new and I bleed the brakes through with new fluid and there was air in the system. The issue with the rear brake is most people think they only need to bleed a small amount to remove the old fluid and air because the master cylinder is so close to the caliper. With ABS the hose is actually much longer than most would expect meaning a lot of fluid needs to go up to the ABS module (under the fuel tank) and back.
Please if you do not know how to work on brakes yourself, take your bike to a mechanic that you trust to do it for you. Messing with brakes if you do not know what you are doing can get you killed!
There are lots of you tube videos showing how to bleed motorcycle brakes, take your time if doing DIY and make sure you double checked everything before a ride. I would do the rear before attempting the front then you will at least still have your main brake if it all goes wrong.
If you change the rear fluid I would definitely change the front also unless you are certain the bike has new fluid and the front works fine.
Hope you get it sorted, let us know how it goes.