Realize that, of course, finding/raising a Staraptor whose Hidden Power is a specific type will be very hard and requires patience.
Between the Grass and Ground Type, I'd go for Ground. It not only takes care of that Electricity-type weakness you mentioned, but can pull some damage on Rock-types - another weakness for Flying-types - and Steel-types, another traditional bother for Flying-Types.
Grass, on the other hand, only covers that Rock-type weakness.
I would suggest, however, that you find another move other than Hidden Power, as Staraptor really isn't equipped to use Special Attacks on its own. If you have an appropriate Nature and characteristic, and you put in some EV training for Special Attack, you might stand a chance at producing a Staraptor with astonishing Special Attack.
If you choose to go this route, I recommend raising a Quiet Staraptor by fighting Gastly in the Old Chateau - I assume you're playing Diamond/Pearl/Platinum? - preferably with a Characteristic that raises Special Attack to make the most of Hidden Power.