I have set my difficulty to peaceful yet whenever I go into lava or water I will still take damage despite it being in peaceful. I use nucleus as my essentials plugin.
Thats the expected behaviour.
To not take damage, you need to enable invincibility or set damage to modifier to 0. Both of these are developer options. In nucleus you can enable invincibility with the command
If you want to disable just damage taken from lava and water then you will need to use a simple plugin that just disables damage taken in those ways