Feed them something similar to the pellet feeding. For example, if you are feeding sinking pellets try frozen (sinking) shrimp first or sinking fish (if there's any other kind…
. Once they get used to eating food in that way they'll eventually take pellets, just keep reintroducing the pellets and they should take them one day.
You can try moving the pellets and the gars could chase them. I had an alligator gar which ate goldfish pellets on the surface of the water when my powerhead blew the pellets around, he treated them like any other fish.
The type of gar makes a difference in my opinion, some are more accepting than others. Try different methods if the gar won't accept a certain method, eventually they'll take them. I do not believe in the starving method, overall reintroduction of new foods is the best way to get them to eat new foods.