If your recorded guitar sounds overdrive, it is most likely clipped by too hot a signal getting recorded.
You have to pay attention to the meter and adjust the gain down until you are not clipping on your loudest guitar sounds.
Once if clips, it is useless. So, fix that prior to hitting record. You can always turn things up after, but you never want to have clipped signal getting recorded.
You will likely be frustrated for a while, from where it appears you are in your knowledge of this end of music. Do not let that get you down - you just have to follow the advice of the several folks who have suggested you spend some time getting things installed correctly and also do the tutorials. They will really help.
There also a zillion YouTube videos on all aspects of Sonar and of music production in general, and there available videos and books for sale.
Bob Bone