There should be some kind of official jail or prison on the moon. It has to last at least 3 earth days and have at least one person held there.
Can be unofficial as long as it's referred to as a jail nominally holding lawbreakers.
So a kidnapper holding someone in a room and calling it a jail wouldn't count
But if an officer were confined to a stateroom which was made inescapable by the rest of the crew following central orders, that would count. House arrest or voluntary confinement to quarters or some subset of a station wouldn't count.
It requires specific dedication of a space, involuntary confinement, and at least supposed government or legal backing.
@StrayClimb when I look at how they handle crimes in Antarctica I wonder if it makes the odds higher or lower.
On one hand also a remote inhospitable place, but people are subject to home country laws, and in one case the suspect was simply confined to his hut while they investigated
https://www.nytimes.com/2016/09/29/world/what-in-the-world/antarctica-crime.html