Hi sar123
Incredible what they have done (or not). As everyone else said they have cocked up.
The only reason you can't have the same job on same terms and conditions at the end of AML is pretty much if it doesn't exist any more as in your case. They MUST however offer you a suitable alternative on no less favourable terms and conditions. This not only means pay and benefits but also duties an responsibilities. They cannot just put you in a less senior role for example and still pay you the old rate.
You do not have to apply for another job. You would take priority for other roles anyway being on maternity leave.
You could possibly resign and claim constructive dismissal on the grounds that there has been a fundamental breach of mutual trust and confidence that has made the relationship untenable. This is on the grounds that they have cocked up big time, put you through unecessary stress etc with regard to the process - particalary when they should have known better.
In addition you could claim sex discrimination on the grounds that it is pregnancy/birth related etc.
This will be a complicated one and sorry to say you do need specialist advice. Do not take constructive dismissal lightly - lots of people have heard of the phrase and think its easy but its not.
Check your home insurance policy to see if you have legal expenses cover.
In addition to this they should have followed the statutory discipline procedure (minimum 3 step) and written to you initially to say your job is potentially at risk, then invited you in for a meeting to discuss the restructure and the business grounds for it as well as discussing alternative roles etc. I suspect they haven't done any of this either so once again less favourable treatment due to you being on maternity leave = sex discrimination and a stronger case for you!
You need to have a sit down with them on a formal basis - I suggest you follow the formal grievance process now and do it by the letter. Raise all of these issues and see what they are going to do about it. They need to sort it out - your chance to tell them what you want as you need to go into the process with a resolution in mind.
Finally (sorry), do you want to leave there anyway, have you been there long. Could be an opportunity to get a pay off under a compromise agreement where you waive all your rights to claim against them in return for a lump sum big enough for you to go away quietly. Let them make a move on that though, don't suggest it to them.