The attribute name is 'location'. As with all AD properties, you won't see it on a search result object if it doesn't have a value. I've fiddled with your code so that it would just work on my machine.
If you're only retrieving data and not planning to make any changes you don't need to call GetDirectoryEntry (which will impose another round-trip to the servers). Note the slight difference in syntax:
var rootDSE = new DirectoryEntry("LDAP://RootDSE");
var defaultNamingContext = rootDSE.Properties["defaultNamingContext"].Value.ToString();
var domainRootADsPath = String.Format("LDAP://{0}", defaultNamingContext);
var searchRoot = new DirectoryEntry(domainRootADsPath);
var filter = "(&(objectCategory=computer)(name=" + computerName + "))";
var directorySearch = new DirectorySearcher(searchRoot, filter);
var directorySearchResult = directorySearch.FindOne();
if (null != directorySearchResult)
{
Console.WriteLine(directorySearchResult.Properties["cn"][0].ToString());
if (directorySearchResult.Properties["location"].Count > 0)
{
Console.WriteLine(directorySearchResult.Properties["location"][0].ToString());
}
//It's not necessary to run GetDirectoryEntry unless you want to make a change
DirectoryEntry deComp = directorySearchResult.GetDirectoryEntry();
Console.WriteLine(deComp.Properties["cn"].Value.ToString());
if (deComp.Properties["location"].Value != null)
{
Console.WriteLine(deComp.Properties["location"].Value.ToString());
}
}