Had a similar issue where I was simply not able to install Microsoft.Data.SqlClient
package.
I was able to solve it by clearing the nuget cache:
dotnet nuget locals all --clear
and then deleting my local nuget config:
del /q %AppData%\NuGet\NuGet.Config
Afterwards I was able to install the package.