@Loh Jane,
To avoid ambiguity, place the modifying clause before the main clause:
After he had been locked in the police station for two days, the thief has conceded that he stole things.
or right after the subject:
The thief, after he had been locked in the police station for two days, has conceded that he stole things.