Anacostia is about 2.5 miles from the Navy Yard. So, yes & no. It’s close but not adjacent to each other.
2.5 miles is nothing. I walk that every day.
In a speeding car at 2am it’s probably about 2.5 minutes................