Jam needs to be 60-65% sugar to set. Marrows contain lots of water and insignificant sugar. My lazy jam (equal weights fruit & jam sugar microwaved till jammy - no water) uses fruit that's naturally around 10% sugar.
I'm not surprised you are having to boil, boil, boil.
Maybe add some Bramley pulp and some more lemon juice...