For tax purposes, in the District of Columbia, you’re considered a resident if you were domiciled in DC at any time during the taxable year. Please see Do I have to file a DC income tax return? on DC’s Individual Income Tax Filing FAQs page.
The New York definition is a little more complicated – see Resident in Income tax definitions – but it’s likely that you can consider yourself a resident of DC if that’s where you intend your permanent home to be.
Generally you’re considered to be a resident in the state that you intend to be your permanent home. That is, you aren't living in the state for simply a temporary reason.
Please see the TurboTax Help article What is my state residency status? for more information.