If building muscles results in loosing your religion and gaining sins, then what is the use of these muscles, which are going to be ate by the grave.
There is no problem in exercising to become healthier, but be wary of building muscles or doing it to show others, as this is frowned upon in Islamic teachings.
Allah loves stronger human beings. There is no problem is this is done for His sake. Strength should be physical as well as spiritual