The confusion might stem from a misunderstanding of a specific scene in the novel. It's possible you're thinking of the moment where Holmes observes the footprints of a man walking down a dusty road. He correctly deduces the man is young, tall, and strong based on the size and depth of the footprints. However, there is no mention of mistaking anyone's gender or age in this scene.
If you can recall any further details about the scene you're thinking of, I might be able to help you understand it better.