Short answer: yes, you can substitute two Group 31 batteries for two Group 27s.
Since you mention cranking amps, we all may assume these are engine
Or perhaps they do double duty as starting batteries and house batteries? If the latter, you might want to look at "dual-purpose" Group 31s, or perhaps those labeled as "marine deep cycle" batteries. (Others will likely comment the label is an erroneous marketing
term, but OTOH, these could be a slightly better choice for you if they also service
Or... almost any reasonable battery
pair will probably start your auxiliary engine
.... so if these are both starting and house batteries, the comment about a pair of 6V golf cart batteries could be well worth a look. They would truly be "deep cycle" batteries (better for house loads) and will probably provide you enough cranking amps to start the engine. (Compare battery cranking amps to your engine minimum specs for cranking amps.)
As others have said, lots o' threads around here about batteries...