You would use Dexterity.
First, a dead goblin is an improvised weapon.
From the rules on improvised weapons:
Sometimes characters don't have their weapons and have to attack with
whatever is at hand. An improvised weapon includes any object you can
wield in one or two hands, such as broken glass, a table leg, a frying
pan, a wagon wheel, or a dead goblin.
Often, an improvised weapon is similar to an actual weapon and can be
treated as such. For example, a table leg is akin to a club. At the
DM's option, a character proficient with a weapon can use a similar
object as if it were that weapon and use his or her proficiency bonus.
A dead goblin does not seem to resemble a known weapon, (but ask the DM to be sure). From the same section it seems the dead goblin should deal d4 damage regardless of the type of attack used.
An object that bears no resemblance to a weapon deals 1d4 damage (the
DM assigns a damage type appropriate to the object). If a character
uses a ranged weapon to make a melee attack, or throws a melee weapon
that does not have the thrown property, it also deals 1d4 damage. An
improvised thrown weapon has a normal range of 20 feet and a long
range of 60 feet.
Throwing the dead goblin strikes a foe at a distance, so it is a ranged attack.
From the rules on ranged attacks:
When you make a ranged attack, you fire a bow or a crossbow, hurl a handaxe, or otherwise send projectiles to strike a foe at a distance.
The rule on modifiers used with attack rolls says:
Ability Modifier. The ability modifier used for a melee weapon
attack is Strength, and the ability modifier used for a ranged weapon
attack is Dexterity. Weapons that have the finesse or thrown property
break this rule.
Dead goblins do not have the thrown property; therefore, they do not break this rule, and you would use your Dexterity modifier.
Personally, I would rule dead goblins are similar to other things with the thrown property and have it gain the thrown property. Also, I would be checking if the thrower can lift a dead goblin (which would also use Strength). But, this would be a DM call.