I have recently applied for a Swiss national type D visa for my PhD studies and I am awaiting a response. My passport has a little less than 4 years validity at the point of application, but I have stated as my intended period of stay as 4 years. Will that lead to rejection of visa?
No, it is fine. Your visa would only be valid for three months anyway.
Once you enter Switzerland you will declare your arrival and apply for a residence permit at a communal or cantonal population/migration/resident/foreigner office depending on your place of residence.
The residence permit is renewed annually. A valid passport is required at the time of renewal and many administrative procedures require a valid passport, but you will have plenty of time to renew your passport in Switzerland (or in your home country). Once the passport is renewed, you should communicate your new passport information to the relevant population office as well.