Allahs rules are fixed in every era and we should follow them but current society has bexome so corrupt in the matter of non mehram topic that it has become nearly impossible to dodge it. Walk on the streets huge billboards portray them, tv, mobile, news paper, etc. How to avoid them and the thoughts generating from that?

God ordered us to lower our gaze so the responsibility of protecting ourselves against temptation lies within us not with what is around us.