A federal court has ruled against Republicans challenging a redrawn Pennsylvania congressional district map that will take effect in time for the state’s May primary.