Changing out suspension forks for non suspension forks
Yes.  This can be done.

There are some important considerations that you should make, however, before the change.  Frames are generally built with a particular amount of travel in mind.  The frame geometry is "optimized" for a fork of that travel.  Adding one with less or more travel can change the geometry, handling, and feel of the bike.  Many rigid fork manufacturers these days make various versions of a fork meant to replace a suspension fork of specific travel and keep frame geometry the same, or as close as possible.  Additionally, the fork will need to have whatever axle spacing and brake setup that you have on the current suspension fork.  

All of that before installation, which will generally require some specialized tools to cut the steer tube to the proper/same length and then clean up the cut.   You'll possibly also need some headset parts if the old ones can't be removed from the old fork without damage.  Lastly you'll need to do a headset and brake adjusts after the fork installation.  All of those tasks are relatively simple, but best left to someone who has done it before, or supervised by someone who has done it before.