You could use either, but I think that 'the community' is better here. As Nick said, 'general public' and 'society' refer to a larger group of people than 'community'. If you used 'community', you would be referring to the people that live around the offender. Perhaps in the same town, or in the same suburb. Those are the people that are more likely to be affected by that one offender. The other two options are more likely to be used for (say) the population of the entire country, or at least the whole city.