The distance has nothing to do with it.
If the shed has a sub-panel in it then it REQUIRES a grounding electrode. If it is only fed with a circuit then no ground rod is required, or needed IMO.
In typical AC building wiring ground rods serve VERY little purpose.
As pointed out rods are required as well as an equipment grounding conductor installed with the feeders.
Isolation of the neutral from the EGC and the grounding electrode conductor and panel enclosure.
Most place will ask for two ground rods unless you get someone with specal tester to verify if the ground is under 25 ohms { that can get very expensive to do that } so it cheaper just get two ground rods and be done with it and keep the rods at least 2 meter apart { 6 feet } or more.