Gradient-based Design of Computational Granular Crystals