Here is how I basically cook sweet corn on the grill.
Shuck each ear of corn, and tear out a sheet of foil for each one, enough to roll the ear a few times.
Place ear on top of foil, add salt, pepper and two pats of butter on top of the ear. Roll the foil over the ear once until the butter is on the bottom. Press down to mush the butter on to the ear. Roll the rest of the way up making sure to close the corners.
Roast on your grill on medium heat for about 10 -15 minutes. Done.