That’s odd.
Firstly, here are the names for the Cinemachine package:
You want to install com.unity.cinemachine@3.1. That’s the name you need for the following. Copy it from the website in case I made a typo.
Secondly, try to download it by name. If that didn’t work, try to install it from a git URL.
And if that didn’t work either, close Unity. Then look for the manifest.json in your Assets folder. Open it. Then take a look at Rick’s file. Copy the line with Cinemachine, and paste it into your file. Rename 3.1.1 to 3.1.2. Save the file, launch Unity, then open your project. Theoretically, Unity should install the missing package.
Did this work for you?