The Join/Unjoin Geometry tool does not attach a wall to a roof.
You cannot join a roof to more than one top face of another roof.
You can join a roof to the top face of another roof and the wall below that roof if you select the wall as the target. The wall must be attached to the target roof and the target roof must be a footprint roof.