can be prosecuted under two different theories. The statute discusses a defendant "who solicits or who agrees to engage in or who engages
act of prostitution.
I don't know the particular nature of this sting operation and what the nature of this sting was, so I can't say whether or not the DA will have a case. But arguably, even if you didn't offer money to a vice squad officer dressed up like a hooker, if the police had probable to believe that you were present in that hotel because you'd already engaged in some sexual activity, you could be charged under the same statute. Or, if you were stung on line, and that's how you got to the hotel in the first place, you could be charged as well.
The law is pretty clear, however, that something more than mere presence must go on or anybody just nodding or pointing in the direction of someone who happened to be a prostitute could end up being arrested. So this may be a case you would want to fight. You shouldn't try to do that without a lawyer, however, as you certainly don't want a charge like this on your record if you can at all avoid it.
As to Miranda: Miranda only stands for the fact that the police are not allowed to question you after your arrest unless you've been informed of your rights. Miranda has nothing whatsoever to do with the legality of your arrest. If you were never Mirandized and you were never interrogated about this incident after your arrest, Miranda is meaningless as far as your case is concerned. If on the other hand, you were questioned about the incident and you gave a statement or signed a confession, you'd be able to explore the possible illegality of the police conduct in a pre-trial hearing designed to deal with such matters. If you won the hearing, the statements you made would not be able to be used against you at trial.