The navy said the men were captured January 2 after they allegedly attacked a Dutch cargo ship off the coast of Somalia .