It doesn't look like you're sharing the entire story.
If ur last deffered sentence was completed it will not come into play. The state will need to prove beyond a reasonable doubt that you had intent to sexually assault them. They must be basing this on something that you're not disclosing because otherwise they would have been charging u with a criminal tresspass. Not to mention that if you by mistake went into someones apartment it only takes a few seconds to apologize and leave. Doesn't sound like that happened. Anyway based on ur post, it seems like you definetly commited the crime of criminal tresspas but proving that u had intent to sexually assault someone is harder especially if hte act didn't occur.