The YMCA location at 17th and Rhode Island Avenue NW in the District will be closing. (Gerald Martineau/The Washington Post)

The YMCA National Capital facility in downtown Washington is within walking distance of dozens of its competitors — an assortment of yoga studios and boutique and big box gyms that largely didn’t exist a decade ago.

These new high-end gyms, supported by the city’s recent influx of young, affluent residents, have drained membership at the 37-year-old YMCA, with enrollment numbers plummeting from a peak of 11,000 in the late 1990s to 3,400 today.

The YMCA of Metropolitan Washington announced this week that it’s shuttering the facility at the end of the year, leaving six in the region. In the past few years, the YMCA has invested $1.5 million to improve the ailing infrastructure at the downtown branch, in the 1700 block of Rhode Island Avenue NW, but the decline in membership has persisted.

“It has had a sustained dwindling membership, and it has continued to have a deficit,” said Angie Reese-Hawkins, president and chief executive of the YMCA of Metropolitan Washington.

The YMCA approved a deal to sell the hulking, 1970s concrete building to Akridge, a big local developer, for an undisclosed amount. At 100,000 square feet, it’s the YMCA’s biggest facility in the region, and the property, according to the D.C. Office of Tax and Revenue, has an assessed taxable value of $27.2 million.

Akridge would not comment on its plans for the property. The real estate company also owns a new building nearby at 17th and M streets NW.

The National Capital facility was never a typical one for the YMCA. The nonprofit organization traditionally serves neighborhoods, not business districts, and Reese-Hawkins said the money from the sale of the building will boost the organization’s community, after-school and summer programs throughout the region.

She hopes to eventually open another full-service YMCA in the city and is in talks with community leaders to assess the best fit. There are no gyms in the District east of the Anacostia River, and Reese-Hawkins said it is possible that one could land there.

“As a not-for-profit, you have to be very strategic about looking at where you need to go in a city that has all the shifting demographics that we have in this city as a result of revitalization, restoration, new growth,” Reese-Hawkins said, adding that she will look at a variety of factors, including obesity rates and services offered in specific communities. “The best-practice model for the YMCA to have long-term sustainability and to achieve its mission is to be in a neighborhood.”

When the facility closes Dec. 31, the 3,400 downtown members can use the facilities at the recently renovated Anthony Bowen facility — which was founded in 1853 as the first YMCA facility in the world open to African Americans. That 44,000-square-foot facility, located just a mile north in the 1300 block of W Street NW, was renovated in 2013 after being closed for nearly five years.

“I am extremely disappointed — it’s like a family place to exercise. It’s for community types,” said Ruth Stenstrum, 68, who has been a member of the National Capital facility for nearly two decades and likes to do water aerobics in its pool. “I remember when this was the new building. I still think of it as this new facility.”

The YMCA said about 25 percent of its members downtown use the Anthony Bowen gym as part of a multi-facility membership. Still, it won’t be an easy transition. The National Capital facility is popular with people who live throughout the region but work downtown and want to go to the gym during their lunch breaks.

“I can’t make it to the other Y facilities during lunch,” said Emily Tye, 27, who lives in Virginia, works downtown and is canceling her membership. “It’s a real community feel here.”

The YMCA also has a number of smaller facilities throughout the city, and Reese-Hawkins said that most of the after-school and community programs associated with the downtown location are operated off-site and will continue as normal. She said officials are working with schools to secure a site for the facility’s 2016 summer camp.

The YMCA will still have to contend with the city’s changing demographics and increased competition from others gyms. A loss in membership, said Reese-Hawkins, translates to more than just a loss in membership dollars.

The YMCA relies on its gym members to become connected to the organization and subsequently make donations or volunteer at some of the community programming they learn about while at the facility.

“Our thing at the Y is that we try to move the people that are engaged with us at a casual relationship, as a gym user, to more of a committed relationship,” Reese-Hawkins said. “Not only would you have a sense of belonging at the Y, but as a result of the experience, you’d want to help read to the kids or be engaged in some other way.”