DON'T mess around manually with important system files (like /etc/passwd), as this thread may teach. And even less so do automatic mass changes with scripts... Use the respective system provided tools, e.g. usermod.
If you do, you should know EXACTLY what you are doing and how to reverse possibly wrong-going modifications.
Howsoever, "But its not working" is not an utmost good starting point for an analysis. You should describe exactly what in the current behaviour doesn't fulfill your needs or what the error message(s) be.
I guess the target string is appended to the entry, not replacing the last field's value? So you should provide that value, so the s ubstitute has something to replace:
sed '/^deekshi/s|[^:]*$|/bin/nologin|' file
deekshi:x:7082:7082::/home/deekshi:/bin/nologin
harini1:x:7083:7083::/home/harini1:/bin/bash
On top, it is good practice to anchor the search pattern (if possible), here to the start-of-line, to be safe of false positives.