We report the transverse single-spin asymmetries of $J/psi$ production at forward and backward rapidity, $1.2<|y|<2.2$, as a function of $J/psi$ transverse momentum ($p_T$) and Feynman-$x$ ($x_F$). The data analyzed were recorded by the PHENIX experiment at the Relativistic Heavy Ion Collider in 2015 from $p$$+$$p$, $p$$+$Al, and $p$$+$Au collisions with transversely polarized proton beams at $sqrt{s_{_{NN}}}=200$ GeV. At this collision energy, single-spin asymmetries for heavy-flavor particle production of $p$$+$$p$ collisions provide access to the spin-dependent gluon distribution and higher-twist correlation functions inside the nucleon, such as the gluon Qiu-Sterman and trigluon correlation functions. Proton+nucleus collisions offer an excellent opportunity to study nuclear effects on the correlation functions. The data indicate negative asymmetries at the two-standard-deviation level in the $p$$+$Au data for $p_T<2$ GeV/$c$ at both forward and backward rapidity, while in $p$$+$$p$ and $p$$+$Al collisions the asymmetries are consistent with zero within the range of experimental uncertainties.