Again, this is a complex issue that depends on the individual facts of your case. Whether or not this is pregnancy discrimination depends on what happened to the job and why it the change was made.
There is an old employment law case where a manufacturer would routinely move any pregnant female worker off a certain assembly line because people on that particular line were handling chemicals that were proven to be toxic to the fetuses. Those who worked on this line, both men and women, were paid a lot of money to be exposed to this chemical. However, it was the only area of the plant where a woman could make so much money. An EEOC complaint was filed, and the case went to court. The court found that the employer could legally move the woman away from the toxic chemicals to protect her. However, the employer was required to keep the woman at the same high pay rate until she was no longer pregnant.
In this case the court found that the employer could change a pregnant woman’s job due to imminent danger. These are rare events. The more common issue comes when the woman attempts to return to her job only to be told that the job she previously held no longer exists, and that if she wants to work for the company she may need to take a lower-paying job.
There is no easy answer to this type of situation, and it really depends on the employer. If the employer legitimately eliminated the job due to business reasons, it probably would not be considered pregnancy discrimination. This is another situation where you may need to file an EEOC complaint and let the court look at the evidence.