In this paper, the physical layer security is investigated in a dual-hop wireless communication scenario, where an energy-constrained relay not only assists the source-to-destination information transmission, but also acts as a potential eavesdropper wiretapping the source information. We take into account both antenna mode switching and destination selection for the amplify and forward relaying network. The untrusted relay (UR) is equipped with two antennas, where one antenna that maximizes the source-to-relay channel gain will be selected for reception and the other one is exploited to forward the processed information. Moreover, the Nth best destination is considered as the legitimate destination, which aims to achieve a better secrecy rate. Specially, in general signal-to-noise ratio regime, a low-complexity Gaussian Q-function is introduced to derive the exact closed-form expression of ergodic secrecy rate (ESR). In addition, when the UR works in a non-linear energy harvesting mode, the achievable secrecy rate maximization problem is formulated and solved by an alternative optimization method. The simulation results reveal the correctness of the theoretical derivation and also proves that much higher secrecy performance can be achieved by the proposed scheme than other benchmark schemes.