Connecting an unattached well house breaker panel, proper grounding
How to handle this

I'm going to presume that there's a panel here (if not, I'd slap a decent-sized main breaker loadcenter in there, a Siemens P3030B1100CU would be my starting point, and then add the appropriate breaker for the well pump and hook it up), and that we don't have to worry about the generator itself -- it has overcurrent protection in the form of a circuit breaker built in.

As a result, we can simply pull the bonding screw on the loadcenter/panel, and then wire a generator inlet box (locking type, 50A, 120/240V) to it using a 6/3 UF cable such that the hots land on each hot leg of the main breaker, the neutral lands on the main neutral lug, and the ground lands on the main ground lug -- if the panel has no ground bar in it, you will need to add one.  The inlet box will mount to the outside of the shed, by the way (this saves the generator cord from having to be run through a door or window frame).

Once you're done with that, you can then run 6AWG copper from the panel to two driven ground rods, spaced 6' apart, as well as a length of 6AWG copper from the panel to the well casing if the well uses a metal casing.  This takes care of the grounding electrode system.

Once all this is done, you simply take a 50A generator cord, plug it into the generator power receptacle and the inlet, and all should work.  Since things are in a separately derived system configuration, you don't have to fuss with the bonding jumper in your generator at all, and if you want to replace the generator inlet with a permanent feeder in the future, the panel's already configured for that.