You're giving him too much grain. If you want more muscle, you need LESS sugar/starch and more protein. I would cut out the sweet feed entirely and switch to just one pound of a ration balancer type feed. If you post your zip code, I or PeggySue can see what's available locally.
What is in the ranch mix? If there is any corn, I would cut that out too, and switch to either hay pellets (alfalfa or alfalfa/timothy mix) or plain whole oats.
Add to his diet 1/2 cup of milled flax or 1/2 cup of corn oil for added fat, once or twice a day.
All that sugar and starch is reving up his metabolism, which makes him burn more calories, which makes him lose weight and condition. Trust me on this one, it happened to my own horse plus a few others I have cared for. Getting them OFF the sweet feeds and high starch feeds is what made them gain good muscle weight.
For work to build muscle, walk and trot up hill, trot over ground poles, and backing work, all with his head lowered and his rear end really driving from behind. If he lunges, work him in side reins set let at the trot and canter, really driving him forward so you see those hind legs reaching well under his belly.