A judge on Thursday blocked the transfer of $115 million from the state’s share of the national opioid settlement that legislators approved less than a week ago as a key component of balancing a nearly $1.4 billion budget deficit.