Answer
If the prison is within the city and there are no restrictions from the
prison authorities to offer any type of religious acts of any religion, then
it will be permissible to perform Jummu’ah.
and Allah Ta’ala Knows Best
Mufti Ebrahim Desai