The above advice about not having an erection is excellent.
There's a common misconception that guys can get hard anytime, anywhere, for any length of time, for any reason, like our pensises are on-demand switches we can do with as we will. It's not like that. We're humans. Sometimes things can overwhelm us. Sometimes we're stressed. Sometimes something is so new it's too much to handle. This is perfectly normal, and is in no way a reflection on you, nor your interest level in having threesomes.
The first time my wife and I played with another couple (a soft swap), I had trouble getting and maintaining an erection. The woman I was playing with was wonderful in every respect. That first time was a real struggle. We got to play with the same couple again about a month later. I got hard and stayed hard that time, no issues at all.