So not an actual quote of his, but one sprung from the minds of people who imagined him to have said that or meant that.
There's an article that claims to have sourced the origin of that attributed quote (or bogus-quote) to 1964, the Canadian playwright and ex-inmate John Herbert [1]&[2] which I imagine you'd enjoy reading as the article author, Ilya Vinitsky, argues that Dostoyevsky would have been _aware_ of the Western notions of "civilisation" and prisons while not being _aligned_ with them.
A strong case is made for Herbert having started that attribution to Dostoyevsky, and for inspiring the spread of the quote as Herbert and his work were latched onto by prison reformers of the late 1960s and early 1970s.
[1] https://lareviewofbooks.org/article/dostoyevsky-misprisioned...
[2] https://lareviewofbooks.org/short-takes/beyond-reasonable-do...
The articles trace far more than I can (I'm not in the least bit fluent in Russian), and the specific blame likely falls to a non Russian prison inmate reading as widely as possible in prison, jumbling multiple sources, taking "literary licence" and not having access to a lot of background on Dostoyevsky.