A federal judge has thwarted the Trump administration's plan to relocate the FBI headquarters to the Reagan Building, igniting claims of political interference.