A US college will shut down after falling victim to ransomware amid efforts to recover from the pandemic.