I grill cod directly on the grate and rarely have any trouble. When shopping for fish, look for Captain’s Cut. It is the thicker filet.
I spray the grate with cooking spray and coat the fish with a mixture of melted butter and onion and a splash of white wine (I sometimes use vermouth). Put the butter side down on the grate for four minutes or so, and coat the ‘up’ side. Then flip and let the other side cook for about the same time. The grill makes are evident and there is little to no sticking.
I was very surprised because I thought the onion would overpower the fish and that did not happen either.
You can also use cast iron on the grill instead of foil if you do not want to place fish right on the grilling surface. This is a good way to cook scallops and not the lingering aftersmell in the house.