I've read about the importance about resistance training(strength training). As a swimmer, I can only do 25m butter for now. I can really feel the sourness in my upper body, I can use butterfly as resistance training?
Note that I'm not a swimmer, but I do a reasonable amount of strength training, have a "good enough" foundation of knowledge, and can apply some common sense to the situation.
As has already been noted in the comments, the water is going to provide some resistance. However, that's probably not going to be enough; even if it is enough resistance to start with it's definitely not going to stay that way for long at all.
The fundamental principle for successful strength training is progressive overload. You may go to the gym for the first time ever and only be able to bench press for the desired number of sets and reps using an empty bar. That may be difficult for a few sessions, or even a few weeks, but it will eventually become easy. Once that happens, in order to continue to grow stronger, you'll need to increase the weight (resistance).
Now let's say that the water resistance is equivalent to bench pressing with the empty bar. That's fine until it becomes easy, but what then? In order to keep making gains you need to increase the resistance but there's not really any way to do that.
Your strength workouts should be supplementary to your swim workouts. The strength training will give you a decent foundation of strength to work with as well as increase your muscular endurance for the swim training, while the swim training will provide you with the specific skills and stamina you need.
Swimming, like literally any activity, can be a form of resistance training. However, generally in sports training the purpose of resistance training is to provide a more general stimulus than sport-specific training. That is, it's unlikely that you'll get much stronger by doing the same kind of swimming you've been doing for some time. You can absolutely gain more skill at the stroke, better conditioning for the activity, and so on, but as strength and power stimulus the sport-specific movement very quickly fades into inefficacy.
So yes, swimming can be resistance training, but if you're already pretty good at it then it won't provide the benefits of non-sport-specific resistance training.