This is a bit long for a comment, so posting as an answer.
No, it is not "cheating" to have the goal in mind when trying to prove a result. A given set of hypotheses may have many possible consequences, and very often, simply trying to explore the consequences may lead to aimless flailing around, without any progress towards the result — in other words, what you observe is entirely natural, and you should not be worried. Having the goal in mind focuses the direction of your explorations, and is helpful. Everyone does this. If you know what you want to prove, you might as well use it — there is no need to unnecessarily constrain yourself to ignore it. Even with research mathematicians, though their explorations may induce them to guess/conjecture a certain result, when trying to prove the result, they too will use everything about the result to aid their proof.
Having said all that, there are some things you can do after being done with the proof, to maximize your effectiveness. You can take a step back, examine the structure of the proof, see what steps are specific to the goal and what are natural consequences of the hypotheses, and try to restructure it as a path from X to Y (if it makes it cleaner).
This is exactly parallel to the issue of proof by contradiction, about which I've written in this answer before. The question is whether, when trying to prove that $P \implies Q$, you should just work forwards from $P$, or use both "$P$" and "not $Q$" and work towards a contradiction. The latter is strictly easier (you have more information), and it's undesirable to cripple yourself by avoiding it: Hilbert said
Taking the Principle of the Excluded Middle from the mathematician ... is the same as ... prohibiting the boxer the use of his fists.
So when trying to prove the result, do use everything you have at your disposal, but when trying to write down the proof (or just explain it to yourself), take another look at it and see if restructuring it makes it cleaner / more illuminating, so that it can help you in future.
As a concrete (though perhaps trivial) example, see this question, something about simple algebra and inequalities. I wrote an answer, whose first revision was almost entirely as I thought (using both the hypotheses and desired conclusion, and working from both ends and trying to make them meet), but after writing it down, I was able to slightly see better what was actually happening, and condense the working to the second revision. Not a very good example, but I hope you get the idea.