Necessary and sufficient condition for conjugacy: see Sylvester's law of inertia. In your notation, the two symmetric matrices $K$ and $K'$ are conjugate by a transformation $W^TKW = K'$ if and only if they have the same number of positive and negative eigenvalues (no null eigenvalues since both are nonsingular). The eigenvalues themselves need not be identical though.
Necessary and sufficient condition for $W$ to be unimodular: $K$ need not be unimodular, but the conjugacy relation imposes
$$
[\det(W)]^2 = \frac{\det(K')}{\det(K)}
$$
so $W$ is unimodular if and only if
$$
\det(K) = \det(K')
$$
Finding transformation $W$: Diagonalize $K$ and $K'$ as
$$
K = U^T Q U,\;\;\;\;,U^TU = UU^T = I\;\;\;\;\;Q=Q^T=\text{Diag}(\lambda_K)
$$
$$
K' = {U'}^T{Q'}{U'}, \;\;\;\;\;{U'}^T{U'} = {U'}{U'}^T = I\;\;\;\;\;{Q'}={Q'}^T= \text{Diag}(\lambda_{K'})
$$
where the diagonal matrices $Q$, $Q'$ list the eigenvalues $\lambda_K$, $\lambda_{K'}$ in order, say from smallest to largest. Further define $S = \text{Diag}(\sqrt{|\lambda_K|})$, ${S'} = \text{Diag}(\sqrt{|\lambda_{K'}|})$, and rewrite
$$
Q = S^T D S,\;\;\;\;\; Q' = {S'}^T D {S'}
$$
where $$D = \text{Diag}(\text{sign}(\lambda_K)) = \text{Diag}(\text{sign}(\lambda_{K'}))$$ is now a diagonal unimodular matrix, $[\det(D)]^2 = 1$. Substituting everything into the conjugacy relation brings it to the form
$$
(S U W)^T D (S U W) = ({S'}{U'})^T D ({S'}{U'})
$$
and allows the identification, for instance,
$$
S U W = {S'}{U'}
$$
which eventually gives
$$
W = U^T S^{-1}{S'}{U'}
$$
If $\det(K) = \det(K')$ then also $\det(S) = \det(S')$ and so $\det(W) = \pm 1$, depending on $\det(U)$, $\det(U')$.
Note however that $W$ is not unique. Any ${\bar W} = U^T S^{-1}V{S'}{U'}$ with $V$ such that $V^TDV = D$ (for example $[V, D] = [V^T, D] = 0$ and $V^TV = I$) works just as well.