Hi sofia,
Follow the below steps.
1. Right click on References under your solution.
2. Select Add Reference. The reference can be found under the Framework Assemblies list.
3. Select System.DirectoryServices and click Add.
Or use Nuget to install System.DirectoryServices using below command.
Install-Package System.DirectoryServices -Version 4.0.0