I know zero about the Gray Marine engines. Who's engine is this....... Ford, Chevy, AMC?
I do know that most flywheel ring gears are an applied gear. This means that it is a removable/replaceable component.
Most are Heat/Shrink applied.
Once you know the engine model, someone such as NAPA may be able to source the ring gear for you.
Use caution when applying...... we do not want to over-heat this..... particularly if bringing it anywhere near "Red Hot".
I've seen people do this, and it damages the hardness of the gear, possibly causing premature failure.
Now we are pulling the engine again, for yet another ring gear. Not good!
.