Solution 1:

"set_damage" doesn't exist.

If you want to set durability (now the NBT tag "Damage" instead of metadata, which no longer exists), you can use "set_damage" (but not on coal).

If you want to set NBT, you can use "set_nbt".