If the only issue is the in-flight refueling system (probe/drogue), wouldn't it make more sense to buy the A model and modify the tankers. The refueling issue doesn't compare to the performance penalty (range/internal weapons) of the B model.
The most probable reason is because of commonality, to reduce costs and support logistics. But, it also increases operational flexibility. The UK MOD want to operate them off the Queen Elizabeth carriers, and they do not have a catapult launch, but a ski jump. Only the B version can get airborne with this setup. So, the RAF had to go with the B version also. As mentioned in this article, having all aircraft as B versions means it is easier to always have the amount needed to fill operational squadrons for the carriers. If you split the buy between A and B versions, A versions cannot fill the place of B versions down for maintenance. Note however, the decision wasn’t “plain sailing” (without debate), as mentioned by J Southwell’s answer.
The MOD originally planned to buy the B version, then changed their minds and wanted the C version, then changed their minds again and reverted to the B version when the cost of converting the Queen Elizabeth class aircraft carriers to catapult operation proved excessive.