From San Pedro to Ronda on the A-397 it's about 45kms, the first 22ish see the road rise 1065metres fairly evenly, after that 10ish of gentle climbing then downhill to Ronda.
I cycled up to the 1065metre sign (22kms) 17 times last year on my touring bike but without a load. Take your time with a load & you should be OK, with the usual plenty of fluid, etc.
An alternative route is to go Monda, Guaro, Alozaina, Yunquera & El Burgo, a little easier to climb (not much), but quite a bit further.
The Ronda road is spectacular, great views, depending on the time of day it can have a lot of traffic, but drivers are well use to cyclist being on it, it's a favorite training run for Roadies.