Guard A says "One of us only tells lies".
Guard B says "The other only tells the truth".
Guard A's statement can either be true, or be a lie, and in the case of the latter, there's three places where it can be a lie: "one", "only" and "lies". The truth behind "one" can be "both" or "neither", the truth behind "only" can be "sometimes" or "never", and the truth behind "lies" is "the truth".
In the case of "Both of us only tells lies" being the truth behind Guard A's lie, you're creating a situation where A&B both have to lie. However, for that to work, then "The other only tells the truth" has to contain a lie, which has to once again either be at "other", "only" or "truth". For "other" to be a lie, that would mean "the same guard only tells the truth", which is paradoxical because a guard who always lies can't also always tell the truth"; for "only" in Guard Be's statement to be the lie, it has to mean "sometimes" or "never", and we can reject "sometimes" because it turns the logic fuzzy, and "the other never tells the truth" creates a linguistic problem because Guard A's truth behind the lie already created a set that includes both guards already not telling the truth, so who is this "other" guard who isn't included in the set of both guards who also doesn't tell the truth?
In the case of "neither of us only tells lies" to be the truth behind Guard A's lie, you fall into the trap of meaning either "both of us sometimes tells lies", which creates a fuzzy answer problem, or "both of us only tells truths", which is self-contradictory with statement "one of us only lies", because the same person can't be both always lying and always telling the truth at the same time.
For "only" to be Guard A's lie, that has to become either "sometimes" or "never", and "one of us sometimes tells lies" wrecks the entire premise of the puzzle by making whether the answer to a question is a lie or the truth fuzzy (and we should just rule out the use of "sometimes" as the lie replacing "only" in any statements because it makes the entire logic puzzle fuzzy)
, while "one of us never tells lies" is essentially, "one of us only tells the truth", which, when taken in conjunction with "the other only tells the truth", creates a situation where both tells the truth, which then contradicts Guard A's lie of "one of use only tells lies" being the truth, because it can't be both a lie and the truth at the same time.
In the case of "one of us never tells lies" being the truth behind Guard A's lie, that's paradoxical because it'd have to be a true statement when taken in conjunction with Guard B's "the other only tells truths" create a set where both guards only tell teh truth, except Guard A would be paradoxically lying about lying. Likewise, in the case of "one of us only tells the truth" being the lie behind Guard A's statement, it creates a paradox with Guard B's statement where they assert the "other" guards also tells the truth, which means, if Guard A is the liar, then Guard B's statement becomes a lie because it asserts that both guards ("one" and "the other") are both telling the truth.
In the cases of "both of us only tells the truth" and "neither of us only tells the truth" being the truth behind the lie, it becomes a paradoxical statement because the former is self-contradictory, and the latter is contradicted by Guard B's true statement of "the other only tells the truth".
If Guard A is telling the truth and Guard B is lying, then some or all of "the other always tells the truth" has to be a lie, and the only places where the lie in the sentence can be is "other", "only" or "truth". We can immediately rule out "other" as the lie, because the only thing that leads to is "same", and then it becomes paradoxical with the truths being Guard A's being "one of us only lies" and Guard B's being "the same only tells the truth".
If we substitute "never" for "only", then we get Guard A's truth of "One of us only lies" and Guard B's truth of "the other never tells the truth", which creates a set where both guards are lying, but that would contradiction Guard A telling the truth. Likewise, if we substitute "lies" for "the truth", then we get "One of us only tells lies" and "the other only tells lies", which again leads us to a situation where a set of two liars is created, which contradicts Guard A telling the truth.
Essentially, the only way this logic puzzle can work if the guards are explaining the premise is if the truth within is "one guard only lies, the other sometimes tells the truth" or "one guard sometimes lies, and the other always tells the truth", but then you've got a logic puzzle that can't be solved with just one question.