Mass is measured in grams, accelaration is measured in meters per second squared, and distance is measured in meters. Force is equal to mass times sccelation, and work is equal to force times distance. What is the unit of work?

work is in Joules, J

J = F*d = ma*d= kg-m^s/2 * m = kg-m/s

Note I have used kg instead of grams, since
MKS uses m,kg,s
CGS uses cm,g,s

You can use g,m,s if you want, but then the work will not be measured in Joules or ergs.