An historic building located in downtown’s The District has sold for $5.1 million.