I drove the G30 540i at the launch in 2017 and I loved every bit of the car. The B58 moves that big car very well and the tech and build quality cannot be compared to that of the F30.
I generally don't like bigger cars than the 3 series,but I would without a doubt pick the 540i if I were in your position